3ds Max C++ API Reference
Rendering Modes

Macros

#define GW_NO_ATTS   0x0000000
 No attributes are specified. More...
 
#define GW_WIREFRAME   0x0000001
 The wireframe rendering mode. More...
 
#define GW_ILLUM   0x0000002
 This indicates that you have colors per vertex in your polygons and that they must be used. More...
 
#define GW_FLAT   0x0000004
 Flat (facet) shading mode. More...
 
#define GW_SPECULAR   0x0000008
 This enables the specular highlight display. More...
 
#define GW_TEXTURE   0x0000010
 This enables the texture display. More...
 
#define GW_Z_BUFFER   0x0000020
 When coordinates are specified for drawing primitives, they have x, y, and z values. More...
 
#define GW_PERSP_CORRECT   0x0000040
 In this mode, textures are corrected for the perspective display. More...
 
#define GW_POLY_EDGES   0x0000080
 This mode causes polygon edges (Edged Faces) to be on. More...
 
#define GW_BACKCULL   0x0000100
 Backface culling is used. More...
 
#define GW_TWO_SIDED   0x0000200
 Faces are displayed regardless of their surface normal orientation. More...
 
#define GW_COLOR_VERTS   0x0000400
 This turns on color-per-vertex display. More...
 
#define GW_SHADE_CVERTS   0x0000800
 This modifies GW_COLOR_VERTS. More...
 
#define GW_PICK   0x0001000
 This indicates that hit testing will be performed (not rendering). More...
 
#define GW_BOX_MODE   0x0002000
 Objects are shown using their bounding box. More...
 
#define GW_ALL_EDGES   0x0004000
 All edges of the item are shown (including the hidden ones). More...
 
#define GW_VERT_TICKS   0x0008000
 This mode is actually a pseudo-mode. More...
 
#define GW_SHADE_SEL_FACES   0x0010000
 
#define GW_TRANSPARENCY   0x0020000
 Specifies to use Transparency. More...
 
#define GW_TRANSPARENT_PASS   0x0040000
 Specifies a Second pass to perform Blended Transparency. More...
 
#define GW_EMISSIVE_VERTS   0x0080000
 
#define GW_ALL_OPAQUE   0x0100000
 
#define GW_EDGES_ONLY   0x0200000
 
#define GW_CONSTANT   0x0400000
 
#define GW_HIDDENLINE   0x0800000
 Similar to GW_CONSTANT but the shade color will be the color of the background. More...
 
#define GW_BLENDING   0x1000000
 
#define GW_DEPTHWRITE_DISABLE   0x2000000
 Disables writing into the depth buffer. More...
 
#define GW_GAMMA_CORRECT   0x4000000
 Enable gamma correct. More...
 

Detailed Description

Macro Definition Documentation

◆ GW_NO_ATTS

#define GW_NO_ATTS   0x0000000

No attributes are specified.

◆ GW_WIREFRAME

#define GW_WIREFRAME   0x0000001

The wireframe rendering mode.

◆ GW_ILLUM

#define GW_ILLUM   0x0000002

This indicates that you have colors per vertex in your polygons and that they must be used.

If you have colors per vertex, but this flag is not set, then the colors are ignored.

◆ GW_FLAT

#define GW_FLAT   0x0000004

Flat (facet) shading mode.

◆ GW_SPECULAR

#define GW_SPECULAR   0x0000008

This enables the specular highlight display.

◆ GW_TEXTURE

#define GW_TEXTURE   0x0000010

This enables the texture display.

◆ GW_Z_BUFFER

#define GW_Z_BUFFER   0x0000020

When coordinates are specified for drawing primitives, they have x, y, and z values.

Sometimes when drawing entities in the viewports, you might want to ignore the z values. For example, in the 3ds Max viewports, the text that display the type of viewport (Front, Left, and so on) are drawn without the z values. Similarly, the arc-rotate circle control and the axis tripods are drawn without this flag being set, so they always show up in front.

◆ GW_PERSP_CORRECT

#define GW_PERSP_CORRECT   0x0000040

In this mode, textures are corrected for the perspective display.

◆ GW_POLY_EDGES

#define GW_POLY_EDGES   0x0000080

This mode causes polygon edges (Edged Faces) to be on.

◆ GW_BACKCULL

#define GW_BACKCULL   0x0000100

Backface culling is used.

Entities whose surface normal face away from the view direction are not drawn.

◆ GW_TWO_SIDED

#define GW_TWO_SIDED   0x0000200

Faces are displayed regardless of their surface normal orientation.

◆ GW_COLOR_VERTS

#define GW_COLOR_VERTS   0x0000400

This turns on color-per-vertex display.

◆ GW_SHADE_CVERTS

#define GW_SHADE_CVERTS   0x0000800

This modifies GW_COLOR_VERTS.

If set, the lighting is enabled and the vertex colors are used to modulate the colors that result from the lighting. If off, the colors on each vertex are used directly to shade the triangle. When 3ds Max uses GW_SHADE_CVERTS mode, it puts a white diffuse-only material on the object so that colors appear as shaded without distortion.

When shading is Off, the vertex colors are used directly. This is equivalent to being modulated by a pure white self-illuminated material (the color values are "modulated (multiplied) by 1", so they do not change).

When shading is On, the diffuse white material is illuminated by the scene lighting. It results in shades ranging from black to white (0 to 1), with most vertices being some shade of pure gray. When the vertex colors are modulated by the material color, they get multiplied (in general) by a number less than 1, which makes them appear darker.

The RGB components of the colors are modulated uniformly so that there is no shift from red to green. That will happen if the underlying material is not evenly weighted (a pure gray lying between black and white). In other words, only the intensity of the vertex colors is changed when shading is on, not the luminance, chrominance, and so on.

◆ GW_PICK

#define GW_PICK   0x0001000

This indicates that hit testing will be performed (not rendering).

◆ GW_BOX_MODE

#define GW_BOX_MODE   0x0002000

Objects are shown using their bounding box.

◆ GW_ALL_EDGES

#define GW_ALL_EDGES   0x0004000

All edges of the item are shown (including the hidden ones).

◆ GW_VERT_TICKS

#define GW_VERT_TICKS   0x0008000

This mode is actually a pseudo-mode.

It does not cause GFX to do anything differently, but is tested by the Mesh class, which sends vertex markers (+) if the mode is on.

◆ GW_SHADE_SEL_FACES

#define GW_SHADE_SEL_FACES   0x0010000

◆ GW_TRANSPARENCY

#define GW_TRANSPARENCY   0x0020000

Specifies to use Transparency.

◆ GW_TRANSPARENT_PASS

#define GW_TRANSPARENT_PASS   0x0040000

Specifies a Second pass to perform Blended Transparency.

◆ GW_EMISSIVE_VERTS

#define GW_EMISSIVE_VERTS   0x0080000

◆ GW_ALL_OPAQUE

#define GW_ALL_OPAQUE   0x0100000

◆ GW_EDGES_ONLY

#define GW_EDGES_ONLY   0x0200000

◆ GW_CONSTANT

#define GW_CONSTANT   0x0400000

◆ GW_HIDDENLINE

#define GW_HIDDENLINE   0x0800000

Similar to GW_CONSTANT but the shade color will be the color of the background.

◆ GW_BLENDING

#define GW_BLENDING   0x1000000

◆ GW_DEPTHWRITE_DISABLE

#define GW_DEPTHWRITE_DISABLE   0x2000000

Disables writing into the depth buffer.

◆ GW_GAMMA_CORRECT

#define GW_GAMMA_CORRECT   0x4000000

Enable gamma correct.

Only used for post scene callbacks