GM_startOpenGL
Starts OpenGL graphics for the game
Declaration
ibool MGLAPI GM_startOpenGL(
MGL_glContextFlagsType flags)
Prototype In
gm/gm.h
Parameters
flags |
OpenGL Rendering Context flags |
Return Value
True on success, false on error
Description
This functions enables support for the OpenGL 3D API for the Game Framework, and after this call you must do all rendering via calls to the OpenGL API. The flags parameter (of type MGL_glContextFlagsType) is used to specify the type of OpenGL rendering context that you want, such as if you want RGB or color index mode, single or double buffering, an alpha buffer, an accumulation buffer, a depth buffer (z-buffer) and a stencil buffer.
If you pass in a value of MGL_GL_VISUAL for the flags parameter, the MGL will use the OpenGL visual that was set by a previous call to MGL_glSetVisual. Hence if you require more control over the type of OpenGL rendering context that is created, you can call MGL_glChooseVisual and MGL_glSetVisual before calling this function. Note that you should not call MGL_glCreateContext when using the Game Framework, but call this function instead.
Note: After this function has been called, the current rendering context will have been made the current OpenGL rendering context with a call to MGL_glMakeCurrent, so you can simply start issuing OpenGL rendering commands to start drawing after calling this function.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com