vrj::GlExtensionLoaderWin32 Class Reference

WGL specific class for loading extensions. More...

#include <GlExtensionLoaderWin32.h>

Inheritance diagram for vrj::GlExtensionLoaderWin32:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GlExtensionLoaderWin32 ()
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 wglJoinSwapGroupNV (HDC hdc, GLuint group)
BOOL wglBindSwapBarrierNV (GLuint group, GLuint barrier)
BOOL wglQuerySwapGroupNV (HDC hdc, GLuint *group, GLuint *barrier)
BOOL wglQueryMaxSwapGroupsNV (HDC hdc, GLuint *maxGroups, GLuint *maxBarriers)
BOOL wglQueryFrameCountNV (HDC hdc, GLuint *count)
BOOL wglResetFrameCountNV (HDC hdc)

Protected Attributes

boost::shared_ptr< WglFuncsmWglFuncs

Classes

struct  WglFuncs

Detailed Description

WGL specific class for loading extensions.

Definition at line 47 of file GlExtensionLoaderWin32.h.


Constructor & Destructor Documentation

vrj::GlExtensionLoaderWin32::GlExtensionLoaderWin32 (  ) 

Definition at line 87 of file GlExtensionLoaderWin32.cpp.

References mWglFuncs.

00088 {
00089    mWglFuncs = boost::shared_ptr<WglFuncs>(new WglFuncs);
00090 }


Member Function Documentation

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

Register common extensions that we may need to use.

Reimplemented from vrj::GlExtensionLoader.

Definition at line 92 of file GlExtensionLoaderWin32.cpp.

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

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

00093 {
00094    GlExtensionLoader::registerExtensions();
00095 
00096    mWglFuncs->wglJoinSwapGroupNV       = (PFNWGLJOINSWAPGROUPNVPROC)       (getFunctionByName("wglJoinSwapGroupNV"));
00097    mWglFuncs->wglBindSwapBarrierNV     = (PFNWGLBINDSWAPBARRIERNVPROC)     (getFunctionByName("wglBindSwapBarrierNV"));
00098    mWglFuncs->wglQuerySwapGroupNV      = (PFNWGLQUERYSWAPGROUPNVPROC)      (getFunctionByName("wglQuerySwapGroupNV"));
00099    mWglFuncs->wglQueryMaxSwapGroupsNV  = (PFNWGLQUERYMAXSWAPGROUPSNVPROC)  (getFunctionByName("wglQueryMaxSwapGroupsNV"));
00100    mWglFuncs->wglQueryFrameCountNV     = (PFNWGLQUERYFRAMECOUNTNVPROC)     (getFunctionByName("wglQueryFrameCountNV"));
00101    mWglFuncs->wglResetFrameCountNV     = (PFNWGLRESETFRAMECOUNTNVPROC)     (getFunctionByName("wglResetFrameCountNV"));
00102 }

bool vrj::GlExtensionLoaderWin32::hasSwapGroupNV (  ) 

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

Definition at line 105 of file GlExtensionLoaderWin32.cpp.

References mWglFuncs.

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

00106 {
00107    return (mWglFuncs->wglJoinSwapGroupNV != NULL);
00108 }

BOOL vrj::GlExtensionLoaderWin32::wglJoinSwapGroupNV ( HDC  hdc,
GLuint  group 
)

Definition at line 110 of file GlExtensionLoaderWin32.cpp.

References mWglFuncs.

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

00111 {
00112    vprASSERT(mWglFuncs->wglJoinSwapGroupNV != NULL && "Attemped to call unsupported extension.");
00113    return mWglFuncs->wglJoinSwapGroupNV(hdc, group);
00114 }

BOOL vrj::GlExtensionLoaderWin32::wglBindSwapBarrierNV ( GLuint  group,
GLuint  barrier 
)

Definition at line 116 of file GlExtensionLoaderWin32.cpp.

References mWglFuncs.

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

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

BOOL vrj::GlExtensionLoaderWin32::wglQuerySwapGroupNV ( HDC  hdc,
GLuint *  group,
GLuint *  barrier 
)

Definition at line 122 of file GlExtensionLoaderWin32.cpp.

References mWglFuncs.

00123 {
00124    vprASSERT(mWglFuncs->wglQuerySwapGroupNV != NULL && "Attemped to call unsupported extension.");
00125    return mWglFuncs->wglQuerySwapGroupNV(hdc, group, barrier);
00126 }

BOOL vrj::GlExtensionLoaderWin32::wglQueryMaxSwapGroupsNV ( HDC  hdc,
GLuint *  maxGroups,
GLuint *  maxBarriers 
)

Definition at line 128 of file GlExtensionLoaderWin32.cpp.

References mWglFuncs.

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

00129 {
00130    vprASSERT(mWglFuncs->wglQueryMaxSwapGroupsNV != NULL && "Attemped to call unsupported extension.");
00131    return mWglFuncs->wglQueryMaxSwapGroupsNV(hdc, maxGroups, maxBarriers);
00132 }

BOOL vrj::GlExtensionLoaderWin32::wglQueryFrameCountNV ( HDC  hdc,
GLuint *  count 
)

Definition at line 134 of file GlExtensionLoaderWin32.cpp.

References mWglFuncs.

00135 {
00136    vprASSERT(mWglFuncs->wglQueryFrameCountNV != NULL && "Attemped to call unsupported extension.");
00137    return mWglFuncs->wglQueryFrameCountNV(hdc, /*screen,*/ count);
00138 }

BOOL vrj::GlExtensionLoaderWin32::wglResetFrameCountNV ( HDC  hdc  ) 

Definition at line 140 of file GlExtensionLoaderWin32.cpp.

References mWglFuncs.

00141 {
00142    vprASSERT(mWglFuncs->wglResetFrameCountNV != NULL && "Attemped to call unsupported extension.");
00143    return mWglFuncs->wglResetFrameCountNV(hdc/*, screen*/);
00144 }


Member Data Documentation

boost::shared_ptr<WglFuncs> vrj::GlExtensionLoaderWin32::mWglFuncs [protected]

Definition at line 76 of file GlExtensionLoaderWin32.h.

Referenced by GlExtensionLoaderWin32(), hasSwapGroupNV(), registerExtensions(), wglBindSwapBarrierNV(), wglJoinSwapGroupNV(), wglQueryFrameCountNV(), wglQueryMaxSwapGroupsNV(), wglQuerySwapGroupNV(), and wglResetFrameCountNV().


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