diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-06 05:04:23 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-06 05:04:23 +0000 |
| commit | 6c6dd47448a7478884f8856a8543964ab6d981fb (patch) | |
| tree | fc61c53a2a658d225a003ec7a8f993fe09d0eacf /Graphics/GraphicsEngineOpenGL | |
| parent | Enabled back some Vulkan performance warnings (diff) | |
| download | DiligentCore-6c6dd47448a7478884f8856a8543964ab6d981fb.tar.gz DiligentCore-6c6dd47448a7478884f8856a8543964ab6d981fb.zip | |
Always using negative viewport height in Vulkan to be 100% consistent with Direct3D
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" ); |
