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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user