Added OpenGL attributes and unified Update() and Clean()

Added OpenGL attributes to add double-buffer functionality and correctly
set OpenGL color depths. Update() and Clear() were unified to clarify and
clean code.