25#ifndef SB_GL_CONTEXT_HELPER_H
26#define SB_GL_CONTEXT_HELPER_H
31#ifndef HIDDEN_FROM_DOC
33#if defined(OIV_HEADLESS)
34typedef void *EGLDisplay;
35typedef void *EGLConfig;
36typedef void *EGLSurface;
37typedef void *EGLContext;
39#elif defined(__APPLE__)
40typedef struct _CGLContextObject *CGLContextObj;
41typedef struct _CGLPixelFormatObject *CGLPixelFormatObj;
42typedef unsigned int CGDirectDisplayID;
44typedef struct _XDisplay
Display;
45typedef unsigned long GLXDrawable;
46typedef unsigned long GLXPixmap;
48typedef unsigned long GLXFBConfigID;
49typedef unsigned long GLXWindow;
50typedef unsigned long GLXPbuffer;
52typedef unsigned long Pixmap;
53typedef unsigned long Window;
54#if !defined(BUILDING_SB_GL_CONTEXT_HELPER)
55typedef struct __GLXFBConfigRec *GLXFBConfig;
94 int getContextGroupId();
99SbGLShareContext::SbGLShareContext()
106SbGLShareContext::SbGLShareContext(
SoGLContext* _shareContext,
int _shareContextID)
113SbGLShareContext::getContext()
119SbGLShareContext::getContextGroupId()
129#if defined(OIV_HEADLESS)
139#elif defined(__APPLE__)
211 bool direct,
const std::vector<int> &attribs);
#define PIXELFORMATDESCRIPTOR
Class encapsulating information about an OpenGL context: a handle on an OpenGL context and its id.
int shareContextID
Corresponding shared context Id managed by upper layer viewer class.
SoGLContext * shareContext
Handle on OpenGL context.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> OpenGL context m...
Platform indepent functions for OpenGL context handling.
VisualInfo getWindowVisualInfo(Display dpy, Drawable drawable)
Returns the VisualInfo used for the specified drawable.
GLContext getCurrentContext()
Return the current active context.
bool isValidDisplay(Display dpy)
Return true if the specified display is valid.
bool makeCurrent(Display dpy, Drawable drawable, GLContext ctx)
Make given context current.
Drawable getCurrentDrawable()
Return the current active drawable.
SoINTERNAL GLContext createContextAttribs(Display dpy, VisualInfo vis, GLContext shareList, bool direct, const std::vector< int > &attribs)
Create a new context.
void releaseVisualInfo(VisualInfo visualInfo)
Release a VisualInfo returned by getWindowVisualInfo()
GLContext createContext(Display dpy, VisualInfo vis, GLContext shareList, bool direct)
Create a new context.
Display getCurrentDisplay()
Return the current active display.
bool destroyContext(Display dpy, GLContext ctx)
Destroy given context.