Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-10 16:51:20 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-10 16:55:14 +0300
commit72f63ba7e9be0c41dff4c3ed3c4fb527b607dbc3 (patch)
tree5d81dd72fe9651aefb3c0804ce8f45074794be20 /source/blender/gpu/opengl/gl_state.cc
parent7f4799a18931a1b9f8edd970cd4bb30bf1577d40 (diff)
GPUState: Fix Point Size issues
The point size was not updated in the right branch and setting the point size via GPU_point_size was effectively disabling its use.
Diffstat (limited to 'source/blender/gpu/opengl/gl_state.cc')
-rw-r--r--source/blender/gpu/opengl/gl_state.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc
index 03762edac93..487cd4369cc 100644
--- a/source/blender/gpu/opengl/gl_state.cc
+++ b/source/blender/gpu/opengl/gl_state.cc
@@ -141,13 +141,13 @@ void GLStateManager::set_mutable_state(const GPUStateMutable &state)
GPUStateMutable changed = state ^ current_mutable_;
/* TODO remove, should be uniform. */
- if (changed.point_size != 0) {
+ if (changed.point_size != 0.0f) {
if (state.point_size > 0.0f) {
glEnable(GL_PROGRAM_POINT_SIZE);
- glPointSize(state.point_size);
}
else {
glDisable(GL_PROGRAM_POINT_SIZE);
+ glPointSize(fabsf(state.point_size));
}
}