diff options
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_draw.h | 7 | ||||
-rw-r--r-- | source/blender/gpu/GPU_shader.h | 1 | ||||
-rw-r--r-- | source/blender/gpu/GPU_state.h | 1 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 12 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_state.c | 13 |
5 files changed, 15 insertions, 19 deletions
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h index 8b830aadbba..507baa9531e 100644 --- a/source/blender/gpu/GPU_draw.h +++ b/source/blender/gpu/GPU_draw.h @@ -51,13 +51,6 @@ struct ViewLayer; void GPU_state_init(void); -/* Programmable point size - * - shaders set their own point size when enabled - * - use glPointSize when disabled */ - -void GPU_enable_program_point_size(void); -void GPU_disable_program_point_size(void); - /* Mipmap settings * - these will free textures on changes */ diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index 00570bd7ebc..0fe5427019a 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -156,7 +156,6 @@ typedef enum eGPUBuiltinShader { GPU_SHADER_3D_UNIFORM_COLOR, /* Sets Z-depth to 1.0 (draw onto background). */ GPU_SHADER_3D_UNIFORM_COLOR_BACKGROUND, - GPU_SHADER_3D_UNIFORM_COLOR_INSTANCE, /** * Take a 3D position and color for each vertex without color interpolation. * diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h index 48c700adaed..7b970786e5e 100644 --- a/source/blender/gpu/GPU_state.h +++ b/source/blender/gpu/GPU_state.h @@ -49,6 +49,7 @@ void GPU_line_smooth(bool enable); void GPU_line_width(float width); void GPU_point_size(float size); void GPU_polygon_smooth(bool enable); +void GPU_program_point_size(bool enable); void GPU_scissor(int x, int y, int width, int height); void GPU_scissor_get_f(float coords[4]); void GPU_scissor_get_i(int coords[4]); diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 638729d027c..5f27a0e93cd 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -1354,7 +1354,7 @@ static void gpu_disable_multisample(void) void GPU_state_init(void) { - GPU_disable_program_point_size(); + GPU_program_point_size(false); glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); @@ -1374,16 +1374,6 @@ void GPU_state_init(void) gpu_disable_multisample(); } -void GPU_enable_program_point_size(void) -{ - glEnable(GL_PROGRAM_POINT_SIZE); -} - -void GPU_disable_program_point_size(void) -{ - glDisable(GL_PROGRAM_POINT_SIZE); -} - /** \name Framebuffer color depth, for selection codes * \{ */ diff --git a/source/blender/gpu/intern/gpu_state.c b/source/blender/gpu/intern/gpu_state.c index 176965bb80f..7e8289229f4 100644 --- a/source/blender/gpu/intern/gpu_state.c +++ b/source/blender/gpu/intern/gpu_state.c @@ -126,6 +126,19 @@ void GPU_polygon_smooth(bool enable) } } +/* Programmable point size + * - shaders set their own point size when enabled + * - use glPointSize when disabled */ +void GPU_program_point_size(bool enable) +{ + if (enable) { + glEnable(GL_PROGRAM_POINT_SIZE); + } + else { + glDisable(GL_PROGRAM_POINT_SIZE); + } +} + void GPU_scissor(int x, int y, int width, int height) { glScissor(x, y, width, height); |