Skip to content

Commit

Permalink
GL Context: fixed the warning about unsupported depth clamping
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Aug 23, 2023
1 parent 79c7cd0 commit 8dc5852
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Graphics/GraphicsEngineOpenGL/src/GLContextState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,10 @@ void GLContextState::SetDepthClamp(bool bEnableDepthClamp)
glEnable(GL_DEPTH_CLAMP);
DEV_CHECK_GL_ERROR("Failed to enable depth clamp");
}
else
{
LOG_WARNING_MESSAGE("Depth clamp is not supported by this device. Check the value of the DepthClamp device feature.");
}
}
else
{
Expand All @@ -674,10 +678,6 @@ void GLContextState::SetDepthClamp(bool bEnableDepthClamp)
glDisable(GL_DEPTH_CLAMP);
DEV_CHECK_GL_ERROR("Failed to disable depth clamp");
}
else
{
LOG_WARNING_MESSAGE("Disabling depth clamp is not supported");
}
#pragma warning(pop)
}
m_RSState.DepthClampEnable = bEnableDepthClamp;
Expand Down

0 comments on commit 8dc5852

Please sign in to comment.