vrj::GlxExtensionLoader Class Reference

GLX specific class for loading extensions. More...

#include <GlxExtensionLoader.h>

Inheritance diagram for vrj::GlxExtensionLoader:

Inheritance graph
[legend]
Collaboration diagram for vrj::GlxExtensionLoader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GlxExtensionLoader ()
virtual void registerExtensions ()
 Register common extensions that we may need to use.
NVidia swap control.
bool hasSwapGroupNV ()
 Return true if we have support for NV swap group extensions.
Bool glXJoinSwapGroupNV (::Display *dpy, GLXDrawable drawable, GLuint group)
Bool glXBindSwapBarrierNV (::Display *dpy, GLuint group, GLuint barrier)
Bool glXQuerySwapGroupNV (::Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier)
Bool glXQueryMaxSwapGroupsNV (::Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers)
Bool glXQueryFrameCountNV (::Display *dpy, int screen, GLuint *count)
Bool glXResetFrameCountNV (::Display *dpy, int screen)

Protected Attributes

boost::shared_ptr< GlxFuncsmGlxFuncs

Classes

struct  GlxFuncs

Detailed Description

GLX specific class for loading extensions.

Definition at line 45 of file GlxExtensionLoader.h.


Constructor & Destructor Documentation

vrj::GlxExtensionLoader::GlxExtensionLoader (  ) 

Definition at line 86 of file GlxExtensionLoader.cpp.

References mGlxFuncs.

00087 {
00088    mGlxFuncs = boost::shared_ptr<GlxFuncs>(new GlxFuncs);
00089 }


Member Function Documentation

void vrj::GlxExtensionLoader::registerExtensions (  )  [virtual]

Register common extensions that we may need to use.

Reimplemented from vrj::GlExtensionLoader.

Definition at line 91 of file GlxExtensionLoader.cpp.

References vrj::GlExtensionLoader::getFunctionByName(), mGlxFuncs, and vrj::GlExtensionLoader::registerExtensions().

Referenced by vrj::GlWindowXWin::open().

00092 {
00093    GlExtensionLoader::registerExtensions();
00094 
00095    mGlxFuncs->glXJoinSwapGroupNV       = (PFNGLXJOINSWAPGROUPNVPROC)       (getFunctionByName("glXJoinSwapGroupNV"));
00096    mGlxFuncs->glXBindSwapBarrierNV     = (PFNGLXBINDSWAPBARRIERNVPROC)     (getFunctionByName("glXBindSwapBarrierNV"));
00097    mGlxFuncs->glXQuerySwapGroupNV      = (PFNGLXQUERYSWAPGROUPNVPROC)      (getFunctionByName("glXQuerySwapGroupNV"));
00098    mGlxFuncs->glXQueryMaxSwapGroupsNV  = (PFNGLXQUERYMAXSWAPGROUPSNVPROC)  (getFunctionByName("glXQueryMaxSwapGroupsNV"));
00099    mGlxFuncs->glXQueryFrameCountNV     = (PFNGLXQUERYFRAMECOUNTNVPROC)     (getFunctionByName("glXQueryFrameCountNV"));
00100    mGlxFuncs->glXResetFrameCountNV     = (PFNGLXRESETFRAMECOUNTNVPROC)     (getFunctionByName("glXResetFrameCountNV"));
00101 }

bool vrj::GlxExtensionLoader::hasSwapGroupNV (  ) 

Return true if we have support for NV swap group extensions.

Definition at line 104 of file GlxExtensionLoader.cpp.

References mGlxFuncs.

Referenced by vrj::GlWindowXWin::open().

00105 {
00106    return (mGlxFuncs->glXJoinSwapGroupNV != NULL);
00107 }

Bool vrj::GlxExtensionLoader::glXJoinSwapGroupNV ( ::Display dpy,
GLXDrawable  drawable,
GLuint  group 
)

Definition at line 109 of file GlxExtensionLoader.cpp.

References mGlxFuncs.

Referenced by vrj::GlWindowXWin::open().

00111 {
00112    vprASSERT(mGlxFuncs->glXJoinSwapGroupNV != NULL && "Attemped to call unsupported extension.");
00113    return mGlxFuncs->glXJoinSwapGroupNV(dpy,drawable,group);
00114 }

Bool vrj::GlxExtensionLoader::glXBindSwapBarrierNV ( ::Display dpy,
GLuint  group,
GLuint  barrier 
)

Definition at line 116 of file GlxExtensionLoader.cpp.

References mGlxFuncs.

Referenced by vrj::GlWindowXWin::open().

00117 {
00118    vprASSERT(mGlxFuncs->glXBindSwapBarrierNV != NULL && "Attemped to call unsupported extension.");
00119    return mGlxFuncs->glXBindSwapBarrierNV(dpy,group,barrier);
00120 }

Bool vrj::GlxExtensionLoader::glXQuerySwapGroupNV ( ::Display dpy,
GLXDrawable  drawable,
GLuint *  group,
GLuint *  barrier 
)

Definition at line 122 of file GlxExtensionLoader.cpp.

References mGlxFuncs.

00124 {
00125    vprASSERT(mGlxFuncs->glXQuerySwapGroupNV != NULL && "Attemped to call unsupported extension.");
00126    return mGlxFuncs->glXQuerySwapGroupNV(dpy,drawable,group,barrier);
00127 }

Bool vrj::GlxExtensionLoader::glXQueryMaxSwapGroupsNV ( ::Display dpy,
int  screen,
GLuint *  maxGroups,
GLuint *  maxBarriers 
)

Definition at line 129 of file GlxExtensionLoader.cpp.

References mGlxFuncs.

Referenced by vrj::GlWindowXWin::open().

00131 {
00132    vprASSERT(mGlxFuncs->glXQueryMaxSwapGroupsNV != NULL && "Attemped to call unsupported extension.");
00133    return mGlxFuncs->glXQueryMaxSwapGroupsNV(dpy,screen,maxGroups,maxBarriers);
00134 }

Bool vrj::GlxExtensionLoader::glXQueryFrameCountNV ( ::Display dpy,
int  screen,
GLuint *  count 
)

Definition at line 136 of file GlxExtensionLoader.cpp.

References mGlxFuncs.

00137 {
00138    vprASSERT(mGlxFuncs->glXQueryFrameCountNV != NULL && "Attemped to call unsupported extension.");
00139    return mGlxFuncs->glXQueryFrameCountNV(dpy,screen,count);
00140 }

Bool vrj::GlxExtensionLoader::glXResetFrameCountNV ( ::Display dpy,
int  screen 
)

Definition at line 142 of file GlxExtensionLoader.cpp.

References mGlxFuncs.

00143 {
00144    vprASSERT(mGlxFuncs->glXResetFrameCountNV != NULL && "Attemped to call unsupported extension.");
00145    return mGlxFuncs->glXResetFrameCountNV(dpy,screen);
00146 }


Member Data Documentation

boost::shared_ptr<GlxFuncs> vrj::GlxExtensionLoader::mGlxFuncs [protected]

Definition at line 77 of file GlxExtensionLoader.h.

Referenced by glXBindSwapBarrierNV(), GlxExtensionLoader(), glXJoinSwapGroupNV(), glXQueryFrameCountNV(), glXQueryMaxSwapGroupsNV(), glXQuerySwapGroupNV(), glXResetFrameCountNV(), hasSwapGroupNV(), and registerExtensions().


The documentation for this class was generated from the following files:
Generated on Thu Jan 4 10:58:23 2007 for VR Juggler by  doxygen 1.5.1