mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Tech ENABLE_LEGACY_OPENGL_REMOVAL - Calculation of camera projection matrix
(cherry picked from commit prusa3d/PrusaSlicer@a0630420d9)
This commit is contained in:
parent
1e4f16bd39
commit
59b7c52862
4 changed files with 27 additions and 40 deletions
|
@ -1807,14 +1807,8 @@ void GLCanvas3D::render(bool only_init)
|
|||
camera.requires_zoom_to_volumes = false;
|
||||
}
|
||||
|
||||
camera.apply_view_matrix();
|
||||
camera.apply_projection(_max_bounding_box(true, true, true));
|
||||
|
||||
GLfloat position_cam[4] = { 1.0f, 0.0f, 1.0f, 0.0f };
|
||||
glsafe(::glLightfv(GL_LIGHT1, GL_POSITION, position_cam));
|
||||
GLfloat position_top[4] = { -0.5f, -0.5f, 1.0f, 0.0f };
|
||||
glsafe(::glLightfv(GL_LIGHT0, GL_POSITION, position_top));
|
||||
|
||||
wxGetApp().imgui()->new_frame();
|
||||
|
||||
if (m_picking_enabled) {
|
||||
|
@ -5551,7 +5545,6 @@ void GLCanvas3D::render_thumbnail_internal(ThumbnailData& thumbnail_data, const
|
|||
camera.zoom_to_box(volumes_box);
|
||||
camera.select_view("iso");
|
||||
}
|
||||
camera.apply_view_matrix();
|
||||
|
||||
const Transform3d &view_matrix = camera.get_view_matrix();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue