Shading Viewports
Windows only
Demonstrates how to set a viewport to shaded display.
CRhinoCommand::result CCommandTest::RunCommand( const CRhinoCommandContext& context )
{
CRhinoView* view = RhinoApp().ActiveView();
if( 0 == view )
return CRhinoCommand::failure;
ON::display_mode dm = view->ActiveViewport().DisplayMode();
if( dm != ON::shaded_display )
{
view->ActiveViewport().SetDisplayMode( ON::shaded_display );
context.m_doc.ViewModified( view );
view->Redraw();
}
return CRhinoCommand::success;
}