Platform indepent functions for OpenGL context handling. More...
Typedefs | |
| typedef ::Display * | Display |
| typedef GLXContext | GLContext |
| typedef void * | VisualInfo |
| typedef GLXDrawable | Drawable |
Functions | |
| GLContext | getCurrentContext () |
| Return the current active context. | |
| Display | getCurrentDisplay () |
| Return the current active display. | |
| Drawable | getCurrentDrawable () |
| Return the current active drawable. | |
| bool | isValidDisplay (Display dpy) |
| Return true if the specified display is valid. | |
| VisualInfo | getWindowVisualInfo (Display dpy, Drawable drawable) |
| Returns the VisualInfo used for the specified drawable. | |
| VisualInfo | getWindowVisualInfo (Display dpy, Drawable drawable, GLContext ctx) |
| Returns the VisualInfo used for the specified drawable. | |
| void | releaseVisualInfo (VisualInfo visualInfo) |
| Release a VisualInfo returned by getWindowVisualInfo() | |
| GLContext | createContext (Display dpy, VisualInfo vis, GLContext shareList, bool direct) |
| Create a new context. | |
| bool | destroyContext (Display dpy, GLContext ctx) |
| Destroy given context. | |
| bool | makeCurrent (Display dpy, Drawable drawable, GLContext ctx) |
| Make given context current. | |
| SoINTERNAL GLContext | createContextAttribs (Display dpy, VisualInfo vis, GLContext shareList, bool direct, const std::vector< int > &attribs) |
| Create a new context. | |
Platform indepent functions for OpenGL context handling.
| typedef ::Display* SbGlContextHelper::Display |
Definition at line 146 of file SbGlContextHelper.h.
| typedef GLXDrawable SbGlContextHelper::Drawable |
Definition at line 149 of file SbGlContextHelper.h.
| typedef GLXContext SbGlContextHelper::GLContext |
Definition at line 147 of file SbGlContextHelper.h.
| typedef void* SbGlContextHelper::VisualInfo |
Definition at line 148 of file SbGlContextHelper.h.
| GLContext SbGlContextHelper::createContext | ( | Display | dpy, |
| VisualInfo | vis, | ||
| GLContext | shareList, | ||
| bool | direct ) |
Create a new context.
| dpy | specifies the display (device context on win32) |
| vis | specifies the visual (must be set to 0 on win32) |
| shareList | context to sharelist with (0 means no sharing); it is not used on win32, use shareContext for sharing. |
| direct | set to true for direct rendering (meaningless on win32) |
| SoINTERNAL GLContext SbGlContextHelper::createContextAttribs | ( | Display | dpy, |
| VisualInfo | vis, | ||
| GLContext | shareList, | ||
| bool | direct, | ||
| const std::vector< int > & | attribs ) |
Create a new context.
| dpy | specifies the display (device context on win32) |
| vis | specifies the visual (must be set to 0 on win32) |
| shareList | context to sharelist with (0 means no sharing); it is not used on win32, use shareContext for sharing. |
| direct | set to true for direct rendering (meaningless on win32) |
| attribs | holds options for context creation |
| GLContext SbGlContextHelper::getCurrentContext | ( | ) |
Return the current active context.
| Display SbGlContextHelper::getCurrentDisplay | ( | ) |
Return the current active display.
| Drawable SbGlContextHelper::getCurrentDrawable | ( | ) |
Return the current active drawable.
| VisualInfo SbGlContextHelper::getWindowVisualInfo | ( | Display | dpy, |
| Drawable | drawable ) |
Returns the VisualInfo used for the specified drawable.
Use releaseVisualInfo() to free the returned pointer.
| VisualInfo SbGlContextHelper::getWindowVisualInfo | ( | Display | dpy, |
| Drawable | drawable, | ||
| GLContext | ctx ) |
Returns the VisualInfo used for the specified drawable.
Use releaseVisualInfo() to free the returned pointer.
| bool SbGlContextHelper::isValidDisplay | ( | Display | dpy | ) |
Return true if the specified display is valid.
Make given context current.
| dpy | specifies the display (device context on win32) |
| drawable | specifies a drawable (0 on win32) |
| ctx | specifies the OpenGL context to switch to. |
| void SbGlContextHelper::releaseVisualInfo | ( | VisualInfo | visualInfo | ) |
Release a VisualInfo returned by getWindowVisualInfo()