Base class for user defined GL buffers.
This is the base class for user defined GL buffers, however; it is seldom necessary to derive from this class. It is generally suficient to directly use it. In cases where creating a child class is desirable, it will only work if every overridden method calls the parent method at some point in its execution.
There are two basic ways to use this class, to draw to a pbuffer and to draw to an external window:
To draw to a pbuffer:
To draw to an externally defined window:
Note: It is usually a good idea to use the MPxGlBuffer( M3dView &view ) form of the constructor to insure that the context created is done so correctly.
NOTE: This class only works with the Linux version of Maya.
#include <MPxGlBuffer.h>
Public Member Functions |
|
MPxGlBuffer () | |
Construct an MPxGlBuffer for use
with the currently active view. |
|
MPxGlBuffer (M3dView &view) | |
Construct an MPxGlBuffer for use
with a specified view. |
|
virtual void | beginBufferNotify () |
This method is called when the GL buffer is
being setup by the viewport renderer. |
|
virtual void | endBufferNotify () |
This method is called when the GL buffer is
being shutdown by the viewport renderer. |
|
virtual MStatus | close () |
Close and deallocate the actual pixel
buffer. |
|
Static Public Member Functions |
|
static const char * | className () |
Returns the name of this class. |
MPxGlBuffer | ( | ) |
Construct an MPxGlBuffer for use with the currently active view.
The buffer must match the view with respect to color index or RGB mode, depth, accumulation, and alpha buffers.
MPxGlBuffer | ( | M3dView & | view | ) |
Construct an MPxGlBuffer for use with a specified view.
The buffer must match the view with respect to color index or RGB mode, depth, accumulation, and alpha buffers.
[in] | view | The 3d view to assiciate with the buffer. |
void beginBufferNotify | ( | ) | [virtual] |
This method is called when the GL buffer is being setup by the viewport renderer.
Overriding this call will allow you to access the full GL state after it has been setup but before any drawing has occurred.
If you change any state information from within this call; you must make sure you return it back to this state at the call to endBufferNotify()
void endBufferNotify | ( | ) | [virtual] |
This method is called when the GL buffer is being shutdown by the viewport renderer.
Overriding this call will allow you to access the full GL state after drawing has completed but just before the GL buffer is shut down.
MStatus close | ( | ) | [virtual] |
Close and deallocate the actual pixel buffer.
const char * className | ( | ) | [static] |