NvAppContextGL Class Reference
OpenGL[ES] Context wrapper. More...
#include <NvAppContextGL.h>
Public Member Functions | |
virtual bool | readFramebufferRGBX32 (uint8_t *dest, int32_t &w, int32_t &h) |
Read back the current framebuffer into app-supplied RGBX (32-bit-per-pixel) memory. | |
GLuint | getMainFBO () |
Return the FBO ID of the main screen render target. | |
const NvGLConfiguration & | getConfiguration () const |
The selected [E]GL configuration. | |
virtual GLproc | getGLProcAddress (const char *procname) |
Cross-platform extension function retrieval. | |
virtual bool | isExtensionSupported (const char *ext) |
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
const NvGLConfiguration& NvAppContextGL::getConfiguration | ( | ) | const [inline] |
The selected [E]GL configuration.
- Returns:
- the selected configuration information for the platform
virtual void* NvAppContextGL::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* NvAppContextGL::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 NvAppContextGL::getGLProcAddress | ( | const char * | procname | ) | [inline, 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.
GLuint NvAppContextGL::getMainFBO | ( | ) | [inline] |
Return the FBO ID of the main screen render target.
- Returns:
- the GL ID of the main screen FBO
virtual bool NvAppContextGL::isExtensionSupported | ( | const char * | ext | ) | [inline, 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 NvAppContextGL::readFramebufferRGBX32 | ( | uint8_t * | dest, | |
int32_t & | w, | |||
int32_t & | h | |||
) | [virtual] |
Read back the current framebuffer into app-supplied RGBX (32-bit-per-pixel) memory.
- Parameters:
-
[in,out] dest The destination memory. Must be NULL (in which case on the width and height are returned) or else must point to width*height*4 bytes of memory. In the latter case, on success, the screenshot will have been written to the buffer [out] w the returned width of the image [out] h the returned height of the image
- Returns:
- true on success and false if the implementation does not support screenshots
virtual bool NvAppContextGL::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
The documentation for this class was generated from the following file: