Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Fix opengl backfill
Browse files Browse the repository at this point in the history
Fixes #373
  • Loading branch information
kraflab authored and fabiangreffrath committed Aug 12, 2021
1 parent f5ba5a3 commit ff8c3ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions prboom2/src/gl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,8 @@ void gld_ProcessExtraAlpha(void)
{
if (extra_alpha>0.0f && !invul_method)
{
float current_color[4];
glGetFloatv(GL_CURRENT_COLOR, current_color);
glDisable(GL_ALPHA_TEST);
glColor4f(extra_red, extra_green, extra_blue, extra_alpha);
gld_EnableTexture2D(GL_TEXTURE0_ARB, false);
Expand All @@ -1291,6 +1293,7 @@ void gld_ProcessExtraAlpha(void)
glEnd();
gld_EnableTexture2D(GL_TEXTURE0_ARB, true);
glEnable(GL_ALPHA_TEST);
glColor4f(current_color[0], current_color[1], current_color[2], current_color[3]);
}
}

Expand Down
2 changes: 1 addition & 1 deletion prboom2/src/st_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ static void ST_refreshBackground(void)
flags = VPT_ALIGN_BOTTOM;

// Applies palette to backfill
if (V_GetMode() != VID_MODE8)
if (V_GetMode() == VID_MODE32)
R_FillBackScreen();

V_DrawNumPatch(ST_X, y, BG, stbarbg.lumpnum, CR_DEFAULT, flags);
Expand Down

0 comments on commit ff8c3ed

Please sign in to comment.