================= Rendering effects ================= The MFC Sandbox has a few different rendering modes that can be enabled: shadows, hidden line, smooth, and frame rate. The shadow method available is called "simple shadow". This is not a ray-traced or light-interpolated shadow - it is a visual effect created by texturing. Enabling simple shadows is done on the `HPS::View `_ object using the `HPS::VisualEffectsControl `_: .. literalinclude:: /source/CHPSView.cpp :language: c :start-after: //! [OnModesSimpleShadow] :end-before: //! [OnModesSimpleShadow] Shadow maps are also available...please see `this section `_ for more information about shadows. "Smooth" is a render mode that enables Phong rendering: .. literalinclude:: /source/CHPSView.cpp :language: c :start-after: //! [OnModesSmooth] :end-before: //! [OnModesSmooth] The "Framerate" icon refers to the "fixed-framerate" mode of HNP. In this mode, the number of frames drawn per second is capped at a specified value. In this case, we are capping the framerate at 20: .. literalinclude:: /source/CHPSView.cpp :language: c :start-after: //! [OnModesFrameRate] :end-before: //! [OnModesFrameRate] This screenshot shows shadows, frame rate, and Phong rendering all enabled: .. image:: images/render_modes.png Hidden line rendering (HLR) is a rendering mode that draws edges visible from the camera location (as opposed to a wireframe rendering which draws all edges regardless of whether they are behind other geometry). Hidden line rendering is enabled in the following way: .. literalinclude:: /source/CHPSView.cpp :language: c :start-after: //! [OnModesHiddenLine] :end-before: //! [OnModesHiddenLine] This screenshot shows shadows and HLR enabled, but notice frame rate has been automatically disabled. Additionally, even though shadows are enabled, we don't see them because the geometry's faces are not being rendered, and lines cast no shadow: .. image:: images/render_modes_hlr.png Note that if fixed framerate mode is enabled at this point, it will be automatically disabled because it is not compatible with HLR. More information on hidden line rendering is available `here `_.