Skip to content

Commit

Permalink
Fixed: Render lists mismanaged GL_TEXTURE_2D state leaving it enabled
Browse files Browse the repository at this point in the history
The assumed default state for GL_TEXTURE_2D is disabled, not enabled.
  • Loading branch information
danij-deng committed Dec 18, 2011
1 parent 44eb476 commit 956f827
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions doomsday/engine/portable/src/con_busy.c
Expand Up @@ -456,7 +456,6 @@ static void Con_BusyDrawIndicator(float x, float y, float radius, float pos)
edgeCount = MAX_OF(1, pos * 30);

// Draw a background.
glEnable(GL_BLEND);
GL_BlendMode(BM_NORMAL);

glBegin(GL_TRIANGLE_FAN);
Expand Down Expand Up @@ -601,7 +600,6 @@ void Con_BusyDrawConsoleOutput(void)
}
}

glEnable(GL_BLEND);
GL_BlendMode(BM_NORMAL);

// Dark gradient as background.
Expand Down
2 changes: 0 additions & 2 deletions doomsday/engine/portable/src/gl_draw.c
Expand Up @@ -126,7 +126,6 @@ void GL_DrawRectTextureColor(float x, float y, float width, float height, DGLuin

if(tex || topAlpha < 1.0 || bottomAlpha < 1.0)
{
glEnable(GL_BLEND);
GL_BlendMode(BM_NORMAL);
}
else
Expand All @@ -152,7 +151,6 @@ void GL_DrawRectTextureColor(float x, float y, float width, float height, DGLuin

if(tex)
glDisable(GL_TEXTURE_2D);

glEnable(GL_BLEND);
}

Expand Down
1 change: 1 addition & 0 deletions doomsday/engine/portable/src/rend_list.c
Expand Up @@ -2267,6 +2267,7 @@ END_PROF( PROF_RL_RENDER_SHADOW );
// Return to the normal GL state.
GL_SelectTexUnits(1);
GL_ModulateTexture(1);
glDisable(GL_TEXTURE_2D);
glDepthMask(GL_TRUE);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/rend_main.c
Expand Up @@ -2884,7 +2884,7 @@ static void drawVector(const_pvec3_t origin, const_pvec3_t normal, float scalar,
glBegin(GL_LINES);
glColor4fv(black);
glVertex3f(scalar * normal[VX], scalar * normal[VZ], scalar * normal[VY]);
glColor4f(color[CR], color[CG], color[CB], 1);
glColor3fv(color);
glVertex3f(0, 0, 0);
glEnd();
}
Expand Down
1 change: 0 additions & 1 deletion doomsday/engine/portable/src/ui_main.c
Expand Up @@ -2491,7 +2491,6 @@ void UI_DrawDDBackground(const Point2Raw* origin, const Size2Raw* size, float al

if(alpha < 1.0)
{
glEnable(GL_BLEND);
GL_BlendMode(BM_NORMAL);
}
else
Expand Down

0 comments on commit 956f827

Please sign in to comment.