From b8ac5a2df32172485d67a0b0bd9c961726051384 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 12 Oct 2019 17:29:04 -0700 Subject: Added some comment --- Graphics/GraphicsEngineOpenGL/include/GLContextState.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineOpenGL') 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; } -- cgit v1.2.3