From Xojo Documentation

Revision as of 21:19, 21 September 2021 by Gperlman (talk | contribs) (Notes)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from DesktopUIControl)

Sets up OpenGL on all platforms and provides basic functionality. It does the basic setup of OpenGL on each platform. It's up to you to clear buffers and do all the OpenGL drawing.

Closing Error MouseMove
Configure KeyDown MouseUp
ConstructContextualMenu KeyUp MouseWheel
ContextualMenuItemSelected MouseDown Opening
DragEnter MouseDrag Render
DragExit MouseEnter Resized
DragOver MouseExit

Active fa-lock-32.png Index fa-lock-32.png Parent
AllowAutoDeactivate Left Scope fa-lock-32.png
AllowTabStop LockBottom TabIndex
ColorBits LockLeft Tooltip
ContextHandle fa-lock-32.png LockRight Top
DepthBits LockTop Transparent
DoubleBuffer MouseCursor Visible
Enabled Name fa-lock-32.png Width
Height PanelIndex Window fa-lock-32.png

AcceptFileDrop Close Render
AcceptPictureDrop DrawInto SetFocus
AcceptRawDataDrop MakeCurrent
AcceptTextDrop Refresh


The DesktopOpenGLSurface control and the OpenGL module are based on the OpenGLSurface plug-in from Tinrocket, LLC at

The OpenGL module contains all the OpenGL calls, functions, and constants that you will need. See for the OpenGL documentation. The online version of the Red Book for OpenGL 1.1 is available at

Additional information:

  • OpenGL uses a per-thread context.
  • All of the functions in the OpenGL module affect the current context.
  • The current OpenGL context is undefined outside of an DesktopOpenGLSurface Opening, Resized or Render event.
  • DesktopOpenGLSurface.MakeCurrent can be used to make a specific OpenGLCanvas the current context.

See Also

OpenGL module.