diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-06-29 14:41:01 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-07-05 08:17:02 +0000 |
commit | 0cf3144111cdb1f3cc303813760a315dbe02acb4 (patch) | |
tree | 137d1546193d183499be8c07ee0d9162863bbc99 /src/render/graphicshelpers/graphicscontext_p.h | |
parent | 085c9374ec2dfd6d2d09b195224b8fef7abe1c9e (diff) |
OpenGLVertexArrayObject: emulate VAO support if not supported
This should allow to simplify the current rendering code and will help
improve it later.
Change-Id: Id9405485cf73aca7115ab7b175478af8e5304930
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext_p.h')
-rw-r--r-- | src/render/graphicshelpers/graphicscontext_p.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/render/graphicshelpers/graphicscontext_p.h b/src/render/graphicshelpers/graphicscontext_p.h index 291437a76..65c62bda8 100644 --- a/src/render/graphicshelpers/graphicscontext_p.h +++ b/src/render/graphicshelpers/graphicscontext_p.h @@ -285,6 +285,25 @@ private: bool m_supportsVAO; QScopedPointer<QOpenGLDebugLogger> m_debugLogger; + + friend class OpenGLVertexArrayObject; + OpenGLVertexArrayObject *m_currentVAO; + + struct VAOVertexAttribute + { + HGLBuffer bufferHandle; + GLBuffer::Type bufferType; + int location; + GLint dataType; + uint byteOffset; + uint vertexSize; + uint byteStride; + uint divisor; + }; + + using VAOIndexAttribute = HGLBuffer; + + void enableAttribute(const VAOVertexAttribute &attr); }; } // namespace Render |