Method: Gosu.gl

Defined in:
rdoc/gosu.rb

.gl(z = nil) { ... } ⇒ void

Note:

Gosu does not provide access to the underlying OpenGL APIs. A gem like ruby-opengl is required to use custom OpenGL drawing code.

Note:

Gosu rendering functions MUST NOT be used within the block, and gl MUST be used only within the call tree of Gosu::Window#draw.

This method returns an undefined value.

Runs the block in a clean OpenGL environment.

If a Z-order is given, the block will be scheduled to run between Gosu drawing operations as normal; otherwise, all prior drawing operations will be flushed and the block will be executed immediately.

Parameters:

  • z (Float) (defaults to: nil)

    the Z-order.

Yields:

  • OpenGL code.

See Also:


1048
# File 'rdoc/gosu.rb', line 1048

def gl(z=nil); end