diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-03-14 07:44:38 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-03-14 07:44:38 +0300 |
commit | 9bf0b246ac495b901362f1cc4e74d9b3772d9195 (patch) | |
tree | 05967ce73dd4f5072d8a726142c65c09cf9f6ed5 /source/blender | |
parent | ac276e15410814094c90125ffa528034d02ab967 (diff) |
OpenGL: remove deprecated calls
glMaterial
glColorMaterial
glPixelTransfer
and glEnable/Disable for
GL_FOG, GL_LIGHTING, GL_COLOR_MATERIAL
All of these were just setting default values, so I don't expect any visible change.
Part of T49165 (general OpenGL upgrade)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw_legacy.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 24 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_select_pick.c | 4 |
3 files changed, 0 insertions, 30 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c index 42ecacd4bfc..cba3f3dfb04 100644 --- a/source/blender/editors/space_view3d/view3d_draw_legacy.c +++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c @@ -787,8 +787,6 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d, immDrawPixelsTex(x1 - centx, y1 - centy, ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_LINEAR, ibuf->rect, zoomx, zoomy, col); - glPixelTransferf(GL_ALPHA_SCALE, 1.0f); - glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 3d75acb12f5..e1d9e78c0b2 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -2255,15 +2255,6 @@ static void gpu_multisample(bool enable) void GPU_state_init(void) { - float mat_ambient[] = { 0.0, 0.0, 0.0, 0.0 }; - float mat_specular[] = { 0.5, 0.5, 0.5, 1.0 }; - - glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat_ambient); - glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_specular); - glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular); - glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 35); - glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); - GPU_default_lights(); GPU_disable_program_point_size(); @@ -2279,9 +2270,6 @@ void GPU_state_init(void) glDisable(GL_ALPHA_TEST); glDisable(GL_BLEND); glDisable(GL_DEPTH_TEST); - glDisable(GL_FOG); - glDisable(GL_LIGHTING); - glDisable(GL_COLOR_MATERIAL); glDisable(GL_LOGIC_OP); glDisable(GL_STENCIL_TEST); glDisable(GL_TEXTURE_1D); @@ -2294,18 +2282,6 @@ void GPU_state_init(void) glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); - glPixelTransferi(GL_MAP_COLOR, GL_FALSE); - glPixelTransferi(GL_RED_SCALE, 1); - glPixelTransferi(GL_RED_BIAS, 0); - glPixelTransferi(GL_GREEN_SCALE, 1); - glPixelTransferi(GL_GREEN_BIAS, 0); - glPixelTransferi(GL_BLUE_SCALE, 1); - glPixelTransferi(GL_BLUE_BIAS, 0); - glPixelTransferi(GL_ALPHA_SCALE, 1); - glPixelTransferi(GL_ALPHA_BIAS, 0); - - glPixelTransferi(GL_DEPTH_BIAS, 0); - glPixelTransferi(GL_DEPTH_SCALE, 1); glDepthRange(0.0, 1.0); glMatrixMode(GL_TEXTURE); diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index 0a77420fa25..780ffd82671 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -331,10 +331,6 @@ void gpu_select_pick_begin( glDepthFunc(GL_LEQUAL); } - /* set just in case */ - glPixelTransferf(GL_DEPTH_BIAS, 0.0); - glPixelTransferf(GL_DEPTH_SCALE, 1.0); - float viewport[4]; glGetFloatv(GL_SCISSOR_BOX, viewport); |