IDisplayManager Class Reference


Detailed Description

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

#include <IDisplayManager.h>

Inheritance diagram for IDisplayManager:
Inheritance graph
[legend]

List of all members.

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.

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.

IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager
IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager IDisplayManager