summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-13 00:29:04 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-13 00:29:04 +0000
commitb8ac5a2df32172485d67a0b0bd9c961726051384 (patch)
tree7d8ebbeab58124ef68e29faeee9123e1c003239b /Graphics/GraphicsEngineOpenGL
parentOpenGL backend: improved buffer binding (diff)
downloadDiligentCore-b8ac5a2df32172485d67a0b0bd9c961726051384.tar.gz
DiligentCore-b8ac5a2df32172485d67a0b0bd9c961726051384.zip
Added some comment
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; }