Shaded display pipeline

@stevebaer
Could you tell me what is the difference between

DisplayPipeline.ShadingRequired
DisplayPipeline.SupportsShading
DisplayPipeline.DisplayPipelineAttributes.ShadingEnabled

Which property is true on a shaded viewport but false on a wireframe viewport?

ShadingRequired - If the pipeline is currently not using a render engine that supports shading and during the drawing of a frame it is determined that something needs to be shaded, this flag is set to inform the redraw mechanism that it should redraw and attempt to switch to a pipeline/engine that supports shading.

SupportsShading - True if the display engine support drawing triangles with lighting effects. Basically this is false for GDI and true for OpenGL and DirectX.

ShadingEnabled - A wrapper for CDisplayPipelineAttributes::m_bShadeSurface, which indicates if a surface or mesh should be shaded.

1 Like

This is typically your best check for determining if shading will occur during a draw operation.

1 Like