Skip to content

Commit

Permalink
Fixed opengl Scissor test if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelFB committed Oct 1, 2023
1 parent 2c4dfb2 commit 0d76f8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified Platform/libs/lib64/libFosterPlatform.so
Binary file not shown.
8 changes: 4 additions & 4 deletions Platform/src/foster_renderer_opengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,10 +1390,6 @@ void FosterDraw_OpenGL(FosterDrawCommand* command)

// Scissor
if (command->hasScissor != 0)
{
fgl.glDisable(GL_SCISSOR_TEST);
}
else
{
FosterRect scissor = command->scissor;
scissor.y = height - scissor.y - scissor.h;
Expand All @@ -1404,6 +1400,10 @@ void FosterDraw_OpenGL(FosterDrawCommand* command)
fgl.glEnable(GL_SCISSOR_TEST);
fgl.glScissor((GLint)scissor.x, (GLint)scissor.y, (GLint)scissor.w, (GLint)scissor.h);
}
else
{
fgl.glDisable(GL_SCISSOR_TEST);
}

// Draw the Mesh
{
Expand Down

0 comments on commit 0d76f8c

Please sign in to comment.