You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run my application on a computer with OpenGL version 3.1. I found that it always crashes when it tries to set the viewport. Looking through the source I found that anytime you try to set the viewport it calls the glViewportIndexedf function.
According to OpenGL's own documentation this function is not supported on OpenGL versions below 4.1.
There should be a check in Veldrid.OpenGL.OpenGLCommandExecutor.SetViewport function to detect whether the version is correct to use glViewportIndexed or just use glViewport which is supported from OpenGL 2.0.
Yes, this is an issue. There is already a feature flag (GraphicsDeviceFeatures.MultipleViewports) which communicates whether multiple viewports are supported by the device, and this should be reflected correctly already on the GL backend:
OpenGLCommandExecutor should consult that feature flag (or check the extension directly) before it calls that function. Additionally, there should probably be a check inside the base CommandList.SetViewport method which asserts that you don't try to set a viewport where index != 0 if the feature isn't supported.
When trying to run my application on a computer with OpenGL version 3.1. I found that it always crashes when it tries to set the viewport. Looking through the source I found that anytime you try to set the viewport it calls the
glViewportIndexedf
function.According to OpenGL's own documentation this function is not supported on OpenGL versions below 4.1.
There should be a check in
Veldrid.OpenGL.OpenGLCommandExecutor.SetViewport
function to detect whether the version is correct to useglViewportIndexed
or just useglViewport
which is supported from OpenGL 2.0.References:
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glViewportIndexed.xhtml
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glViewport.xhtml
The text was updated successfully, but these errors were encountered: