Previous: , Up: Window Management   [Contents][Index]


3.2.2 OpenGL

Procedure: make-gl-context window

Create an OpenGL context for window.

Procedure: delete-gl-context! context

Delete context, an OpenGL context object.

Procedure: call-with-gl-context window proc

Call proc with a new OpenGL context created for window, and close the context when proc returns or otherwise exits.

Procedure: swap-gl-window window

Update window with OpenGL rendering.

Procedure: set-gl-attribute! attr value

Set the OpenGL attribute represented by the symbol attr to value. Possible values for attr are:

Procedure: set-gl-swap-interval! interval

Set the framebuffer swap interval for the current OpenGL context to the type indicated by the symbol interval. Possible values of interval are:

Late swap tearing works the same as vsync, but if the vertical retrace has been missed for a given frame, buffers are swapped immediately, which might be less jarring for the user during occasional framerate drops.