IDisplayManager Class Reference
 
 
 
IDisplayManager Class Reference

This reference page is linked to from the following overview topics: Nitrous Graphics SDK Extensions.


#include <IDisplayManager.h>

Inheritance diagram for IDisplayManager:
FPStaticInterface FPInterfaceDesc FPInterface BaseInterface InterfaceServer MaxHeapOperators IDisplayManager2

Class Description

Deprecated:
Deprecated class.

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.

See also:
Please refer to the what's new guide, and porting to the new Viewport Display SDK

Public Member Functions

virtual bool  IsRetainedModeEnabled () const =0
  Plug-ins that have a mesh representati​on and use Mesh::render(​) in their implementati​on 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.

Member Function Documentation

virtual bool IsRetainedModeEnabled ( ) const [pure virtual]

Plug-ins that have a mesh representati​on and use Mesh::render(​) in their implementati​on 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 IsRetained​ModeEnabled(​) 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::​IsRetained​ModeEnabled(​)) 
                {
                        return 0;
        ​     }
        ​     // other display code stays unchanged
        }
Returns:
True if the current viewport graphics driver runs in retained mode.
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.

Parameters:
vpt The specific viewport in which we want to know whether we are performing hardware hit testing.