Skip to content

Commit

Permalink
move this down
Browse files Browse the repository at this point in the history
  • Loading branch information
Desour committed Jan 5, 2025
1 parent 76be5a9 commit 41e2c76
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions irr/src/OpenGL/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1197,17 +1197,6 @@ void COpenGL3DriverBase::setRenderStates3DMode()
//! Can be called by an IMaterialRenderer to make its work easier.
void COpenGL3DriverBase::setBasicRenderStates(const SMaterial &material, const SMaterial &lastmaterial, bool resetAllRenderStates)
{
// fillmode
if (Version.Spec != OpenGLSpec::ES && // not supported in gles
(resetAllRenderStates ||
(lastmaterial.Wireframe != material.Wireframe) ||
(lastmaterial.PointCloud != material.PointCloud))) {
GL.PolygonMode(GL_FRONT_AND_BACK,
material.Wireframe ? GL_LINE :
material.PointCloud ? GL_POINT :
GL_FILL);
}

// ZBuffer
switch (material.ZBuffer) {
case ECFN_DISABLED:
Expand Down Expand Up @@ -1322,6 +1311,17 @@ void COpenGL3DriverBase::setBasicRenderStates(const SMaterial &material, const S
getGLBlend(srcAlphaFact), getGLBlend(dstAlphaFact));
}

// fillmode
if (Version.Spec != OpenGLSpec::ES && // not supported in gles
(resetAllRenderStates ||
(lastmaterial.Wireframe != material.Wireframe) ||
(lastmaterial.PointCloud != material.PointCloud))) {
GL.PolygonMode(GL_FRONT_AND_BACK,
material.Wireframe ? GL_LINE :
material.PointCloud ? GL_POINT :
GL_FILL);
}

// Polygon Offset
if (resetAllRenderStates ||
lastmaterial.PolygonOffsetDepthBias != material.PolygonOffsetDepthBias ||
Expand Down

0 comments on commit 41e2c76

Please sign in to comment.