This reference page is linked to from the following overview topics: Nitrous Graphics SDK Extensions.
#include <IDisplayManager.h>
Use IDisplayManager2 instead. /*! 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.
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 | IsHardwareHitTesting (ViewExp *vpt) const =0 |
Queries whether the system is performing
hardware hit testing for a specific viewport. |
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 }
virtual bool IsHardwareHitTesting | ( | ViewExp * | vpt | ) | const [pure virtual] |
Queries whether the system is performing hardware hit testing for a specific viewport.
The new viewport graphics system is capable of performing hardware hit testing by rendering all scene objects into a viewport-sized buffer using GPU. For performance sake, plug-ins that have a mesh representation and use Mesh::select() to perform hit testing in their implementation of BaseObject::HitTest need to skip the Mesh::select() call if they already implemented BaseObject::UpdateDisplay to render the mesh in retained mode and IsHardwareHitTesting() returns true. By doing this, plugins can avoid duplicated mesh drawings, and the mesh will be rendered in retained mode, which is significantly faster.
vpt | The specific viewport in which we want to know whether we are performing hardware hit testing. |