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)
This commit is contained in:
parent
ac276e1541
commit
9bf0b246ac
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue