mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Tech ENABLE_GLBEGIN_GLEND_SHADERS_ATTRIBUTES - Use vertex attributes and matrices in shaders. 1st installment.
Shader: flat - Default bed (cherry picked from commit prusa3d/PrusaSlicer@a5ff37013b)
This commit is contained in:
committed by
Noisyfox
parent
5fc056edfb
commit
9f4713eee8
@@ -12,6 +12,8 @@
|
||||
#include "GUI_App.hpp"
|
||||
#include "GUI_Colors.hpp"
|
||||
#include "GLCanvas3D.hpp"
|
||||
#include "Plater.hpp"
|
||||
#include "Camera.hpp"
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
||||
@@ -702,10 +704,13 @@ void Bed3D::render_default(bool bottom)
|
||||
|
||||
update_bed_triangles();
|
||||
|
||||
GLShaderProgram *shader = wxGetApp().get_shader("flat");
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("flat_attr");
|
||||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
|
||||
const Transform3d matrix = wxGetApp().plater()->get_camera().get_projection_view_matrix();
|
||||
shader->set_uniform("projection_view_model_matrix", matrix);
|
||||
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
glsafe(::glEnable(GL_BLEND));
|
||||
glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
|
||||
|
||||
Reference in New Issue
Block a user