#include <MPxGlBuffer.h>
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.
Public Member Functions | |
MPxGlBuffer () | |
MPxGlBuffer (M3dView &view) | |
virtual void | beginBufferNotify () |
virtual void | endBufferNotify () |
virtual MStatus | close () |
MPxGlBuffer::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::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 MPxGlBuffer::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 MPxGlBuffer::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 MPxGlBuffer::close | ( | ) | [virtual] |
Close and deallocate the actual pixel buffer.
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |