Restructred the enabling of vertex array object support to allow one to set enable the default via osg::State.

Added OSG_VERTEX_BUFFER_HINT env var to osg::DisplaySettings with VERTEX_BUFFER_OBJECT/VBO, VERTEX_ARRAY_OBJECT/VAO and NO_PREFERENCE to allow one to foce on VBO or VAO usage.

Restructred BufferObject assigned in osg::Geometry

Added
This commit is contained in:
Robert Osfield
2016-08-12 18:44:38 +01:00
parent d8fdf33be5
commit 94891778c4
10 changed files with 175 additions and 116 deletions

View File

@@ -299,15 +299,15 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
int getNvOptimusEnablement() const;
enum GeometryImplementation
enum VertexBufferHint
{
OLD_GEOMETRY_IMPLEMENTATION,
NEW_GEOMETRY_IMPLEMENTATION,
NO_PREFERENCE,
VERTEX_BUFFER_OBJECT,
VERTEX_ARRAY_OBJECT
};
void setGeometryImplementation(GeometryImplementation gi) { _geometryImplementation = gi; }
GeometryImplementation getGeometryImplementation() const { return _geometryImplementation; }
void setVertexBufferHint(VertexBufferHint gi) { _vertexBufferHint = gi; }
VertexBufferHint getVertexBufferHint() const { return _vertexBufferHint; }
void setKeystoneHint(bool enabled) { _keystoneHint = enabled; }
@@ -399,7 +399,7 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
SwapMethod _swapMethod;
unsigned int _syncSwapBuffers;
GeometryImplementation _geometryImplementation;
VertexBufferHint _vertexBufferHint;
bool _keystoneHint;
FileNames _keystoneFileNames;