OpenGLSurface

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from RectControl)

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.

Events
Close DragOver MouseMove
Configure Error MouseWheel
ConstructContextualMenu KeyDown Open
ContextualMenuAction KeyUp Render
DragEnter MouseEnter
DragExit MouseExit


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


Methods
AcceptFileDrop Close Refresh
AcceptPictureDrop DrawInto Render
AcceptRawDataDrop Invalidate SetFocus
AcceptTextDrop MakeCurrent

Notes

The OpenGLSurface control and the OpenGL module are based on the OpenGLSurface plug-in from Tinrocket, LLC at http://2002-2010.tinrocket.com/software/openglsurface/index.html.

The OpenGL module contains all the OpenGL calls, functions, and constants that you will need. See http://www.opengl.org/ for the OpenGL documentation. The online version of the Red Book for OpenGL 1.1 is available at http://www.glprogramming.com/red.

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 OpenGLSurface Open, Resized or Render event.
  • OpenGLSurface.MakeCurrent can be used to make a specific OpenGLCanvas the current context.

See Also

OpenGL module.