Class: RetroRender::OpenGLContext

Inherits:
Object
  • Object
show all
Defined in:
lib/retro_render.rb

Instance Method Summary collapse

Constructor Details

#initializeOpenGLContext

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

#clearObject



77
78
79
# File 'lib/retro_render.rb', line 77

def clear
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
end