createRenderWindow and "externalGLControl" option

Minor issues with the Ogre API that can be trivial to fix
Post Reply
dermont
Bugbear
Posts: 812
Joined: Thu Dec 09, 2004 2:51 am
x 42

createRenderWindow and "externalGLControl" option

Post by dermont »

Maybe it's just me but I read the createRenderWindow "externalGLControl" option literally as referring to to a Window only. Shouldn't the references to "external window control" be to a "external drawable" instead.

Code: Select all

externalGLControl 
Let the external window control OpenGL i.e. don't select a pixel format for the window, do not change v-sync and do not swap buffer. When set to true, the calling application is responsible of OpenGL initialization and buffer swapping. It should also create an OpenGL context for its own rendering, Ogre will create one for its use. Then the calling application must also enable Ogre OpenGL context before calling any Ogre function and restore its OpenGL context after these calls. 
For example an application to create screenshots without a XWindow using a "currentGLContext" and directing Ogre rendering to GLXPbuffer crashes on glXSwapIntervalSGI:

Code: Select all

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  135 (GLX)
  Minor opcode of failed request:  16 (X_GLXVendorPrivate)
  Resource id in failed request:  0x3400002
  Serial number of failed request:  0
  Current serial number in output stream:  42
Disabling glXSwapIntervalSGI either through code or enabling "externalGLControl" resolves the problem.
Post Reply