diff options
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp index 3618354b..e07ce58f 100644 --- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp @@ -214,10 +214,14 @@ namespace Diligent static_cast<float>(w) == vp.Width && static_cast<float>(h) == vp.Height ) { + // GL_INVALID_VALUE is generated if either width or height is negative + // https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glViewport.xml glViewport( x, y, w, h ); } else { + // GL_INVALID_VALUE is generated if either width or height is negative + // https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glViewportIndexed.xhtml glViewportIndexedf( 0, BottomLeftX, BottomLeftY, vp.Width, vp.Height ); } CHECK_GL_ERROR( "Failed to set viewport" ); |
