NvGLAppContext Class Reference

OpenGL[ES] Context wrapper. More...

#include <NvGLAppContext.h>

List of all members.

Public Types

typedef void(* GLproc )(void)
 Cross-platform extension function pointer type.

Public Member Functions

virtual bool bindContext ()=0
 Bind the GL context (and current surface) to the current thread, creating if needed.
virtual bool unbindContext ()=0
 Unbind the GL context from the current thread.
virtual bool swap ()=0
 Swap the rendering buffers (ie present).
virtual bool setSwapInterval (int32_t interval)=0
 Set the swap interval if supported by the platform.
virtual int32_t width ()=0
 Surface width.
virtual int32_t height ()=0
 Surface height.
const NvEGLConfigurationgetConfiguration () const
 The selected [E]GL configuration.
const NvGLPlatformInfogetPlatformInfo () const
 The platform description.
virtual GLproc getGLProcAddress (const char *procname)=0
 Cross-platform extension function retrieval.
virtual bool isExtensionSupported (const char *ext)=0
 Extension support query.
virtual bool requestResetContext ()
 Force context reset.
virtual void * getCurrentPlatformContext ()
 Get platform-specific context.
virtual void * getCurrentPlatformDisplay ()
 Get platform-specific display.


Detailed Description

OpenGL[ES] Context wrapper.

Member Function Documentation

virtual bool NvGLAppContext::bindContext (  )  [pure virtual]

Bind the GL context (and current surface) to the current thread, creating if needed.

Returns:
true on success, false on failure

const NvEGLConfiguration& NvGLAppContext::getConfiguration (  )  const [inline]

The selected [E]GL configuration.

Returns:
the selected configuration information for the platform

virtual void* NvGLAppContext::getCurrentPlatformContext (  )  [inline, virtual]

Get platform-specific context.

This function is for use in special circumstances where the WGL, EGL, GLX, etc context is required by the application. Most applications should avoid this function.

Returns:
the platform-specific context handle, cast to void* or NULL if not supported

virtual void* NvGLAppContext::getCurrentPlatformDisplay (  )  [inline, virtual]

Get platform-specific display.

This function is for use in special circumstances where the WGL, EGL, GLX, etc display is required by the application. Most applications should avoid this function.

Returns:
the platform-specific display handle, cast to void* or NULL if not supported

virtual GLproc NvGLAppContext::getGLProcAddress ( const char *  procname  )  [pure virtual]

Cross-platform extension function retrieval.

Returns:
the named extension function if available. Note that on some platforms, non-NULL return does NOT indicate support for the extension. The only safe way to know if an extension is supported is via the extension string.

const NvGLPlatformInfo& NvGLAppContext::getPlatformInfo (  )  const [inline]

The platform description.

Returns:
the platform information for the system

virtual int32_t NvGLAppContext::height (  )  [pure virtual]

Surface height.

Returns:
the surface height in pixels

virtual bool NvGLAppContext::isExtensionSupported ( const char *  ext  )  [pure virtual]

Extension support query.

Returns:
true if the given string is found in the extension set for the context, false if not. Should only be called with a bound context for safety across all platforms

virtual bool NvGLAppContext::requestResetContext (  )  [inline, virtual]

Force context reset.

Optional per-platform function to request that the GL context be shut down and restarted on demand. Used to test an app's implementation of the initRendering/shutdownRendering sequence

Returns:
true if the feature is supported and the context has been reset, false if not supported or could not be completed

virtual bool NvGLAppContext::setSwapInterval ( int32_t  interval  )  [pure virtual]

Set the swap interval if supported by the platform.

Parameters:
[in] interval the number of VSYNCs to wait between swaps (0 == never wait)
Returns:
true if the platform can support swap interval, false if not

virtual bool NvGLAppContext::swap (  )  [pure virtual]

Swap the rendering buffers (ie present).

Returns:
true on success, false on failure

virtual bool NvGLAppContext::unbindContext (  )  [pure virtual]

Unbind the GL context from the current thread.

Returns:
true on success, false on failure

virtual int32_t NvGLAppContext::width (  )  [pure virtual]

Surface width.

Returns:
the surface width in pixels


The documentation for this class was generated from the following file: