refactor: Migrate ViewCube to shader-based rendering

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-02-15 13:11:14 -07:00
parent 6843a85135
commit e155c9551c
5 changed files with 192 additions and 93 deletions

View File

@@ -245,11 +245,11 @@ void ViewportWidget::paintGL()
m_shaderProgram->release();
// View cube rendering - temporarily disabled as it uses the fixed-function pipeline
// QMatrix4x4 viewCubeModel;
// viewCubeModel.rotate(m_camera->xRotation() / 16.0f, 1, 0, 0);
// viewCubeModel.rotate(m_camera->yRotation() / 16.0f, 0, 1, 0);
// m_viewCube->paintGL(viewCubeModel, width(), height());
// View cube rendering
QMatrix4x4 viewCubeModel;
viewCubeModel.rotate(m_camera->xRotation() / 16.0f, 1, 0, 0);
viewCubeModel.rotate(m_camera->yRotation() / 16.0f, 0, 1, 0);
m_viewCube->paintGL(m_shaderProgram, m_colorLoc, viewCubeModel, width(), height());
glViewport(0, 0, width(), height());
glDisable(GL_DEPTH_TEST);