A core interface for accessing properties of the graphics library introduced in 3ds Max 2012.
The graphics library allows plug-ins to draw into the viewports using a retained mode API. Methods of this class can be used to determine if the graphics driver is running in retained mode which is important when porting plugins that draw into the viewport.
#include <IDisplayManager.h>
Public Member Functions |
|
virtual bool | IsRetainedModeEnabled () const =0 |
Plug-ins that have a mesh representation
and use
Mesh::render() in their implementation of
BaseObject::Display() will need to update their display logic in
order to appear correctly in the viewport when the retained mode
graphics driver is active. |
virtual bool IsRetainedModeEnabled | ( | ) | const [pure virtual] |
Plug-ins that have a mesh representation and use Mesh::render() in their implementation of BaseObject::Display() will need to update their display logic in order to appear correctly in the viewport when the retained mode graphics driver is active.
If a textured lit mesh is required and IsRetainedModeEnabled() returns true, the calls to Mesh::render() needs to be skipped. If the plugin explicitly sets GW_WIREFRAME or unsets GW_LIT and GW_TEXTURE then the call to mesh::render() can be kept in place.
int MyPlugin::Display(TimeValue t, INode* inode, ViewExp *vpt, int flags) { if (MaxSDK::Graphics::IsRetainedModeEnabled()) { return 0; } // other display code stays unchanged }