3d-viewer: Refresh raytracing on rotate

(cherry picked from commit 89d2e67e45)
This commit is contained in:
Seth Hillbrand 2019-04-08 23:01:06 -07:00
parent 1294b4fec8
commit bb779b237a
1 changed files with 36 additions and 6 deletions

View File

@ -291,32 +291,62 @@ void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
case ID_ROTATE3D_X_POS: case ID_ROTATE3D_X_POS:
m_settings.CameraGet().RotateX( glm::radians(ROT_ANGLE) ); m_settings.CameraGet().RotateX( glm::radians(ROT_ANGLE) );
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
m_canvas->Request_refresh(); m_canvas->Request_refresh();
else
m_canvas->RenderRaytracingRequest();
break; break;
case ID_ROTATE3D_X_NEG: case ID_ROTATE3D_X_NEG:
m_settings.CameraGet().RotateX( -glm::radians(ROT_ANGLE) ); m_settings.CameraGet().RotateX( -glm::radians(ROT_ANGLE) );
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
m_canvas->Request_refresh(); m_canvas->Request_refresh();
else
m_canvas->RenderRaytracingRequest();
break; break;
case ID_ROTATE3D_Y_POS: case ID_ROTATE3D_Y_POS:
m_settings.CameraGet().RotateY( glm::radians(ROT_ANGLE) ); m_settings.CameraGet().RotateY( glm::radians(ROT_ANGLE) );
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
m_canvas->Request_refresh(); m_canvas->Request_refresh();
else
m_canvas->RenderRaytracingRequest();
break; break;
case ID_ROTATE3D_Y_NEG: case ID_ROTATE3D_Y_NEG:
m_settings.CameraGet().RotateY( -glm::radians(ROT_ANGLE) ); m_settings.CameraGet().RotateY( -glm::radians(ROT_ANGLE) );
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
m_canvas->Request_refresh(); m_canvas->Request_refresh();
else
m_canvas->RenderRaytracingRequest();
break; break;
case ID_ROTATE3D_Z_POS: case ID_ROTATE3D_Z_POS:
m_settings.CameraGet().RotateZ( glm::radians(ROT_ANGLE) ); m_settings.CameraGet().RotateZ( glm::radians(ROT_ANGLE) );
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
m_canvas->Request_refresh(); m_canvas->Request_refresh();
else
m_canvas->RenderRaytracingRequest();
break; break;
case ID_ROTATE3D_Z_NEG: case ID_ROTATE3D_Z_NEG:
m_settings.CameraGet().RotateZ( -glm::radians(ROT_ANGLE) ); m_settings.CameraGet().RotateZ( -glm::radians(ROT_ANGLE) );
if( m_settings.RenderEngineGet() == RENDER_ENGINE_OPENGL_LEGACY )
m_canvas->Request_refresh(); m_canvas->Request_refresh();
else
m_canvas->RenderRaytracingRequest();
break; break;
case ID_MOVE3D_LEFT: case ID_MOVE3D_LEFT: