Class: RetroRender::OpenGLContext
- Inherits:
-
Object
- Object
- RetroRender::OpenGLContext
- Defined in:
- lib/retro_render.rb
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize ⇒ OpenGLContext
constructor
A new instance of OpenGLContext.
Constructor Details
#initialize ⇒ OpenGLContext
Returns a new instance of OpenGLContext.
71 72 73 74 75 |
# File 'lib/retro_render.rb', line 71 def initialize glEnable(GL_TEXTURE_2D) glEnable(GL_DEPTH_TEST) glClearColor(0.0, 1.0, 0.0, 0.0) end |
Instance Method Details
#clear ⇒ Object
77 78 79 |
# File 'lib/retro_render.rb', line 77 def clear glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) end |