summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/GLContextState.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/include/GLContextState.h b/Graphics/GraphicsEngineOpenGL/include/GLContextState.h
index 9d1d5af6..6d5b2b90 100644
--- a/Graphics/GraphicsEngineOpenGL/include/GLContextState.h
+++ b/Graphics/GraphicsEngineOpenGL/include/GLContextState.h
@@ -78,7 +78,12 @@ public:
void SetNumPatchVertices( Int32 NumVertices);
void Invalidate();
- void InvalidateVAO(){m_VAOId = -1;}
+ void InvalidateVAO()
+ {
+ m_VAOId = -1;
+ // Resetting VAO after that with BindVAO(GLVertexArrayObj::Null()) will still have the effect because
+ // null VAO's ID is 0, not -1.
+ }
bool IsValidVAOBound()const {return m_VAOId > 0;}
void SetCurrentGLContext(GLContext::NativeGLContextType Context) { m_CurrentGLContext = Context; }