Added State::useVertexArrayObject() member to streamline toggling on/off of VAO usage

This commit is contained in:
Robert Osfield
2016-08-04 15:33:02 +01:00
parent a4e682bb28
commit 83f73df814
4 changed files with 121 additions and 104 deletions

View File

@@ -1499,6 +1499,9 @@ class OSG_EXPORT State : public Referenced
bool isVertexBufferObjectSupported() const { return _isVertexBufferObjectSupportResolved?_isVertexBufferObjectSupported:computeVertexBufferObjectSupported(); }
bool isVertexArrayObjectSupported() const { return _isVertexArrayObjectSupported; }
bool useVertexArrayObject() const { return _useVertexArrayObject; }
inline void setLastAppliedProgramObject(const Program::PerContextProgram* program)
{
@@ -2093,6 +2096,9 @@ class OSG_EXPORT State : public Referenced
mutable bool _isVertexBufferObjectSupported;
bool computeVertexBufferObjectSupported() const;
bool _isVertexArrayObjectSupported;
bool _useVertexArrayObject;
typedef void (GL_APIENTRY * ActiveTextureProc) (GLenum texture);
typedef void (GL_APIENTRY * FogCoordPointerProc) (GLenum type, GLsizei stride, const GLvoid *pointer);
typedef void (GL_APIENTRY * SecondaryColorPointerProc) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);