Skip to content

Commit

Permalink
Add Transparency to the Infobar UI
Browse files Browse the repository at this point in the history
- Change Infobar texture format to GL_RGBA.
- Change texturing mode of gInfobarBottomMesh and gInfobarTopMesh to kQ3TexturingModeAlphaBlend.
- Disable clipping of 3D view pane.
Issue jorio#24.
  • Loading branch information
LordNyriox authored Jun 27, 2022
1 parent 65fc5fa commit a1c2b92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Screens/Infobar.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void InitInfobar(void)
/* CREATE TEXTURE */

gInfobarTextureName = Render_LoadTexture(
GL_RGB,
GL_RGBA,
1024,
128,
GL_BGRA,
Expand All @@ -297,7 +297,7 @@ void InitInfobar(void)
uMult * 640,
vMult * 62
);
gInfobarTopMesh->texturingMode = kQ3TexturingModeOpaque;
gInfobarTopMesh->texturingMode = kQ3TexturingModeAlphaBlend;
gInfobarTopMesh->glTextureName = gInfobarTextureName;

/* CREATE BOTTOM MESH */
Expand All @@ -323,7 +323,7 @@ void InitInfobar(void)
uMult * 640,
vMult * (BOTTOM_BAR_Y_IN_TEXTURE + 60));
}
gInfobarBottomMesh->texturingMode = kQ3TexturingModeOpaque;
gInfobarBottomMesh->texturingMode = kQ3TexturingModeAlphaBlend;
gInfobarBottomMesh->glTextureName = gInfobarTextureName;


Expand Down
4 changes: 2 additions & 2 deletions src/System/Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ QD3DSetupInputType viewDef;

viewDef.camera.fov = 1.1;

viewDef.view.paneClip.top = 62;
viewDef.view.paneClip.bottom = gGamePrefs.showBottomBar ? 60 : 0;
viewDef.view.paneClip.top = 0;
viewDef.view.paneClip.bottom = 0;
viewDef.view.paneClip.left = 0;
viewDef.view.paneClip.right = 0;

Expand Down

0 comments on commit a1c2b92

Please sign in to comment.