Fixed build when tech ENABLE_GCODE_VIEWER_STATISTICS is enabled
This commit is contained in:
parent
5229acc693
commit
06b47d98fc
1 changed files with 23 additions and 4 deletions
|
@ -2379,8 +2379,12 @@ void GCodeViewer::render_toolpaths() const
|
||||||
shader.set_uniform("uniform_color", color4);
|
shader.set_uniform("uniform_color", color4);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
auto render_as_points = [this, zoom, point_size, near_plane_height, set_uniform_color]
|
||||||
|
#else
|
||||||
auto render_as_points = [zoom, point_size, near_plane_height, set_uniform_color]
|
auto render_as_points = [zoom, point_size, near_plane_height, set_uniform_color]
|
||||||
(const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
(const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
||||||
#if ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS
|
#if ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS
|
||||||
shader.set_uniform("use_fixed_screen_size", 1);
|
shader.set_uniform("use_fixed_screen_size", 1);
|
||||||
#else
|
#else
|
||||||
|
@ -2409,7 +2413,12 @@ void GCodeViewer::render_toolpaths() const
|
||||||
glsafe(::glDisable(GL_VERTEX_PROGRAM_POINT_SIZE));
|
glsafe(::glDisable(GL_VERTEX_PROGRAM_POINT_SIZE));
|
||||||
};
|
};
|
||||||
|
|
||||||
auto render_as_lines = [light_intensity, set_uniform_color](const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
auto render_as_lines = [this, light_intensity, set_uniform_color]
|
||||||
|
#else
|
||||||
|
auto render_as_lines = [light_intensity, set_uniform_color]
|
||||||
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
(const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
||||||
shader.set_uniform("light_intensity", light_intensity);
|
shader.set_uniform("light_intensity", light_intensity);
|
||||||
for (const RenderPath& path : buffer.render_paths) {
|
for (const RenderPath& path : buffer.render_paths) {
|
||||||
if (path.ibuffer_id == ibuffer_id) {
|
if (path.ibuffer_id == ibuffer_id) {
|
||||||
|
@ -2422,7 +2431,12 @@ void GCodeViewer::render_toolpaths() const
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
auto render_as_triangles = [set_uniform_color](const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
auto render_as_triangles = [this, set_uniform_color]
|
||||||
|
#else
|
||||||
|
auto render_as_triangles = [set_uniform_color]
|
||||||
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
(const TBuffer& buffer, unsigned int ibuffer_id, GLShaderProgram& shader) {
|
||||||
for (const RenderPath& path : buffer.render_paths) {
|
for (const RenderPath& path : buffer.render_paths) {
|
||||||
if (path.ibuffer_id == ibuffer_id) {
|
if (path.ibuffer_id == ibuffer_id) {
|
||||||
set_uniform_color(path.color, shader);
|
set_uniform_color(path.color, shader);
|
||||||
|
@ -2495,7 +2509,12 @@ void GCodeViewer::render_toolpaths() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto render_sequential_range_cap = [set_uniform_color](const SequentialRangeCap& cap) {
|
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
auto render_sequential_range_cap = [this, set_uniform_color]
|
||||||
|
#else
|
||||||
|
auto render_sequential_range_cap = [set_uniform_color]
|
||||||
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
(const SequentialRangeCap& cap) {
|
||||||
GLShaderProgram* shader = wxGetApp().get_shader(cap.buffer->shader.c_str());
|
GLShaderProgram* shader = wxGetApp().get_shader(cap.buffer->shader.c_str());
|
||||||
if (shader != nullptr) {
|
if (shader != nullptr) {
|
||||||
shader->start_using();
|
shader->start_using();
|
||||||
|
|
Loading…
Add table
Reference in a new issue