Method: Gosu::Window#gl

Defined in:
lib/gosu_android/main-window.rb

#gl(z = nil, &custom_gl_code) ⇒ Object

For custom OpenGL calls. Executes the given block in a clean OpenGL environment. Use the ruby-opengl gem to access OpenGL function (if you manage to get it to work). IF no z position is given, it will execute the given block immediately, otherwise, the code will be scheduled to be called between Gosu drawing operations.

Note: You cannot call Gosu rendering functions within this block, and you can only call the gl function in the call tree of Window#draw.

See examples/OpenGLIntegration.rb for an example.



266
# File 'lib/gosu_android/main-window.rb', line 266

def gl(z=nil, &custom_gl_code); end