Skip to content

Commit

Permalink
[rend2] Fix sprites related compiler warning
Browse files Browse the repository at this point in the history
rd-rend2/tr_bsp.cpp:4020:25: warning: comparison between NULL and non-pointer ('GLuint' (aka 'unsigned int') and NULL) [-Wnull-arithmetic]

Thanks to @ensiform for reporing
  • Loading branch information
SomaZ committed Mar 2, 2024
1 parent 442abe3 commit 9a61f07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion shared/rd-rend2/tr_bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4024,7 +4024,7 @@ static void R_GenerateSurfaceSprites( const world_t *world, int worldIndex )
for (int i = 0; i < tr.numShaders; i++)
{
const shader_t *shader = tr.shaders[i];
if (shader->spriteUbo != NULL)
if (shader->spriteUbo != -1)
continue;

numSpriteStages += shader->numSurfaceSpriteStages;
Expand Down
1 change: 1 addition & 0 deletions shared/rd-rend2/tr_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3802,6 +3802,7 @@ static shader_t *GeneratePermanentShader( void ) {
}

RB_AddShaderToShaderInstanceUBO(newShader);
newShader->spriteUbo = -1;

SortNewShader();

Expand Down

0 comments on commit 9a61f07

Please sign in to comment.