BufferObject
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
* Copyright (C) 2012 David Callu
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSG_BUFFEROBJECT
#define OSG_BUFFEROBJECT 1
#include <osg/GL>
#include <osg/GLExtensions>
#include <osg/Object>
#include <osg/buffered_value>
#include <osg/FrameStamp>
#include <osg/GLObjects>
#include <iosfwd>
#include <list>
#include <map>
#ifndef GL_ARB_vertex_buffer_object
#define GL_ARRAY_BUFFER_ARB 0x8892
#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894
#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
#define GL_STREAM_DRAW_ARB 0x88E0
#define GL_STREAM_READ_ARB 0x88E1
#define GL_STREAM_COPY_ARB 0x88E2
#define GL_STATIC_DRAW_ARB 0x88E4
#define GL_STATIC_READ_ARB 0x88E5
#define GL_STATIC_COPY_ARB 0x88E6
#define GL_DYNAMIC_DRAW_ARB 0x88E8
#define GL_DYNAMIC_READ_ARB 0x88E9
#define GL_DYNAMIC_COPY_ARB 0x88EA
#define GL_READ_ONLY_ARB 0x88B8
#define GL_WRITE_ONLY_ARB 0x88B9
#define GL_READ_WRITE_ARB 0x88BA
#define GL_BUFFER_SIZE_ARB 0x8764
#define GL_BUFFER_USAGE_ARB 0x8765
#define GL_BUFFER_ACCESS_ARB 0x88BB
#define GL_BUFFER_MAPPED_ARB 0x88BC
#define GL_BUFFER_MAP_POINTER_ARB 0x88BD
#endif
#ifndef GL_VERSION_1_5
#define GL_STREAM_DRAW 0x88E0
#define GL_STREAM_READ 0x88E1
#define GL_STREAM_COPY 0x88E2
#define GL_STATIC_DRAW 0x88E4
#define GL_STATIC_READ 0x88E5
#define GL_STATIC_COPY 0x88E6
#define GL_DYNAMIC_DRAW 0x88E8
#define GL_DYNAMIC_READ 0x88E9
#define GL_DYNAMIC_COPY 0x88EA
#endif
#ifndef GL_VERSION_2_1
#define GL_PIXEL_PACK_BUFFER 0x88EB
#define GL_PIXEL_UNPACK_BUFFER 0x88EC
#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
#endif
#ifndef GL_ARB_pixel_buffer_object
#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
#endif
namespace osg
{
class State;
class BufferData;
class BufferObject;
class BufferObjectProfile
{
public:
BufferObjectProfile():
_target(0),
_usage(0),
_size(0) {}
BufferObjectProfile(GLenum target, GLenum usage, unsigned int size):
_target(target),
_usage(usage),
_size(size) {}
BufferObjectProfile(const BufferObjectProfile& bpo):
_target(bpo._target),
_usage(bpo._usage),
_size(bpo._size) {}
bool operator < (const BufferObjectProfile& rhs) const
{
if (_target < rhs._target) return true;
else if (_target > rhs._target) return false;
if (_usage < rhs._usage) return true;
else if (_usage > rhs._usage) return false;
return _size < rhs._size;
}
bool operator == (const BufferObjectProfile& rhs) const
{
return (_target == rhs._target) &&
(_usage == rhs._usage) &&
(_size == rhs._size);
}
void setProfile(GLenum target, GLenum usage, unsigned int size)
{
_target = target;
_usage = usage;
_size = size;
}
BufferObjectProfile& operator = (const BufferObjectProfile& rhs)
{
_target = rhs._target;
_usage = rhs._usage;
_size = rhs._size;
return *this;
}
GLenum _target;
GLenum _usage;
GLenum _size;
};
// forward declare
class GLBufferObjectSet;
class GLBufferObjectManager;
inline unsigned int computeBufferAlignment(unsigned int pos, unsigned int bufferAlignment)
{
if (bufferAlignment<2) return pos;
if ((pos%bufferAlignment)==0) return pos;
return ((pos/bufferAlignment)+1)*bufferAlignment;
}
class OSG_EXPORT GLBufferObject : public GraphicsObject
{
public:
GLBufferObject(unsigned int contextID, BufferObject* bufferObject, unsigned int glObjectID=0);
void setProfile(const BufferObjectProfile& profile) { _profile = profile; }
const BufferObjectProfile& getProfile() const { return _profile; }
void setBufferObject(BufferObject* bufferObject);
BufferObject* getBufferObject() { return _bufferObject; }
struct BufferEntry
{
BufferEntry(): numRead(0), modifiedCount(0),dataSize(0),offset(0),dataSource(0) {}
BufferEntry(const BufferEntry& rhs):
numRead(rhs.numRead),
modifiedCount(rhs.modifiedCount),
dataSize(rhs.dataSize),
offset(rhs.offset),
dataSource(rhs.dataSource) {}
BufferEntry& operator = (const BufferEntry& rhs)
{
if (&rhs==this) return *this;
numRead = rhs.numRead;
modifiedCount = rhs.modifiedCount;
dataSize = rhs.dataSize;
offset = rhs.offset;
dataSource = rhs.dataSource;
return *this;
}
unsigned int getNumClients() const;
unsigned int numRead;
unsigned int modifiedCount;
unsigned int dataSize;
unsigned int offset;
BufferData* dataSource;
};
inline unsigned int getContextID() const { return _contextID; }
inline GLuint& getGLObjectID() { return _glObjectID; }
inline GLuint getGLObjectID() const { return _glObjectID; }
inline GLsizeiptr getOffset(unsigned int i) const { return _bufferEntries[i].offset; }
inline void bindBuffer();
inline void unbindBuffer()
{
_extensions->glBindBuffer(_profile._target,0);
}
void release();
inline bool isDirty() const { return _dirty; }
void dirty() { _dirty = true; }
void clear();
void compileBuffer();
void deleteGLObject();
void assign(BufferObject* bufferObject);
bool isPBOSupported() const { return _extensions->isPBOSupported; }
bool hasAllBufferDataBeenRead() const;
void setBufferDataHasBeenRead(const osg::BufferData* bd);
protected:
virtual ~GLBufferObject();
unsigned int computeBufferAlignment(unsigned int pos, unsigned int bufferAlignment) const
{
return osg::computeBufferAlignment(pos, bufferAlignment);
}
unsigned int _contextID;
GLuint _glObjectID;
BufferObjectProfile _profile;
unsigned int _allocatedSize;
bool _dirty;
typedef std::vector<BufferEntry> BufferEntries;
BufferEntries _bufferEntries;
BufferObject* _bufferObject;
public:
GLBufferObjectSet* _set;
GLBufferObject* _previous;
GLBufferObject* _next;
unsigned int _frameLastUsed;
public:
GLExtensions* _extensions;
};
typedef std::list< ref_ptr<GLBufferObject> > GLBufferObjectList;
class OSG_EXPORT GLBufferObjectSet : public Referenced
{
public:
GLBufferObjectSet(GLBufferObjectManager* parent, const BufferObjectProfile& profile);
const BufferObjectProfile& getProfile() const { return _profile; }
void handlePendingOrphandedGLBufferObjects();
void deleteAllGLBufferObjects();
void discardAllGLBufferObjects();
void flushAllDeletedGLBufferObjects();
void discardAllDeletedGLBufferObjects();
void flushDeletedGLBufferObjects(double currentTime, double& availableTime);
osg::ref_ptr<GLBufferObject> takeFromOrphans(BufferObject* bufferObject);
osg::ref_ptr<GLBufferObject> takeOrGenerate(BufferObject* bufferObject);
void moveToBack(GLBufferObject* to);
void addToBack(GLBufferObject* to);
void orphan(GLBufferObject* to);
void remove(GLBufferObject* to);
void moveToSet(GLBufferObject* to, GLBufferObjectSet* set);
unsigned int size() const { return _profile._size * _numOfGLBufferObjects; }
bool makeSpace(unsigned int& size);
bool checkConsistency() const;
GLBufferObjectManager* getParent() { return _parent; }
unsigned int computeNumGLBufferObjectsInList() const;
unsigned int getNumOfGLBufferObjects() const { return _numOfGLBufferObjects; }
unsigned int getNumOrphans() const { return static_cast<unsigned int>(_orphanedGLBufferObjects.size()); }
unsigned int getNumPendingOrphans() const { return static_cast<unsigned int>(_pendingOrphanedGLBufferObjects.size()); }
protected:
virtual ~GLBufferObjectSet();
OpenThreads::Mutex _mutex;
GLBufferObjectManager* _parent;
unsigned int _contextID;
BufferObjectProfile _profile;
unsigned int _numOfGLBufferObjects;
GLBufferObjectList _orphanedGLBufferObjects;
GLBufferObjectList _pendingOrphanedGLBufferObjects;
GLBufferObject* _head;
GLBufferObject* _tail;
};
class OSG_EXPORT GLBufferObjectManager : public GraphicsObjectManager
{
public:
GLBufferObjectManager(unsigned int contextID);
void setNumberActiveGLBufferObjects(unsigned int size) { _numActiveGLBufferObjects = size; }
unsigned int& getNumberActiveGLBufferObjects() { return _numActiveGLBufferObjects; }
unsigned int getNumberActiveGLBufferObjects() const { return _numActiveGLBufferObjects; }
void setNumberOrphanedGLBufferObjects(unsigned int size) { _numOrphanedGLBufferObjects = size; }
unsigned int& getNumberOrphanedGLBufferObjects() { return _numOrphanedGLBufferObjects; }
unsigned int getNumberOrphanedGLBufferObjects() const { return _numOrphanedGLBufferObjects; }
void setCurrGLBufferObjectPoolSize(unsigned int size) { _currGLBufferObjectPoolSize = size; }
unsigned int& getCurrGLBufferObjectPoolSize() { return _currGLBufferObjectPoolSize; }
unsigned int getCurrGLBufferObjectPoolSize() const { return _currGLBufferObjectPoolSize; }
void setMaxGLBufferObjectPoolSize(unsigned int size);
unsigned int getMaxGLBufferObjectPoolSize() const { return _maxGLBufferObjectPoolSize; }
bool hasSpace(unsigned int size) const { return (_currGLBufferObjectPoolSize+size)<=_maxGLBufferObjectPoolSize; }
bool makeSpace(unsigned int size);
osg::ref_ptr<GLBufferObject> generateGLBufferObject(const osg::BufferObject* bufferObject);
void handlePendingOrphandedGLBufferObjects();
void deleteAllGLObjects();
void discardAllGLObjects();
void flushAllDeletedGLObjects();
void discardAllDeletedGLObjects();
void flushDeletedGLObjects(double currentTime, double& availableTime);
GLBufferObjectSet* getGLBufferObjectSet(const BufferObjectProfile& profile);
void newFrame(osg::FrameStamp* fs);
void resetStats();
void reportStats(std::ostream& out);
void recomputeStats(std::ostream& out) const;
unsigned int& getFrameNumber() { return _frameNumber; }
unsigned int& getNumberFrames() { return _numFrames; }
unsigned int& getNumberDeleted() { return _numDeleted; }
double& getDeleteTime() { return _deleteTime; }
unsigned int& getNumberGenerated() { return _numGenerated; }
double& getGenerateTime() { return _generateTime; }
unsigned int& getNumberApplied() { return _numApplied; }
double& getApplyTime() { return _applyTime; }
protected:
virtual ~GLBufferObjectManager();
typedef std::map< BufferObjectProfile, osg::ref_ptr<GLBufferObjectSet> > GLBufferObjectSetMap;
unsigned int _numActiveGLBufferObjects;
unsigned int _numOrphanedGLBufferObjects;
unsigned int _currGLBufferObjectPoolSize;
unsigned int _maxGLBufferObjectPoolSize;
GLBufferObjectSetMap _glBufferObjectSetMap;
unsigned int _frameNumber;
unsigned int _numFrames;
unsigned int _numDeleted;
double _deleteTime;
unsigned int _numGenerated;
double _generateTime;
unsigned int _numApplied;
double _applyTime;
};
class OSG_EXPORT BufferObject : public Object
{
public:
BufferObject();
BufferObject(const BufferObject& bo,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const BufferObject*>(obj)!=NULL; }
virtual const char* libraryName() const { return "osg"; }
virtual const char* className() const { return "BufferObject"; }
void setTarget(GLenum target) { _profile._target = target; }
GLenum getTarget() const { return _profile._target; }
void setUsage(GLenum usage) { _profile._usage = usage; }
GLenum getUsage() const { return _profile._usage; }
BufferObjectProfile& getProfile() { return _profile; }
const BufferObjectProfile& getProfile() const { return _profile; }
void setCopyDataAndReleaseGLBufferObject(bool copyAndRelease) { _copyDataAndReleaseGLBufferObject = copyAndRelease; }
bool getCopyDataAndReleaseGLBufferObject() const { return _copyDataAndReleaseGLBufferObject; }
void dirty();
virtual void resizeGLObjectBuffers(unsigned int maxSize);
void releaseGLObjects(State* state=0) const;
unsigned int addBufferData(BufferData* bd);
void removeBufferData(unsigned int index);
void removeBufferData(BufferData* bd);
void setBufferData(unsigned int index, BufferData* bd);
BufferData* getBufferData(unsigned int index) { return _bufferDataList[index]; }
const BufferData* getBufferData(unsigned int index) const { return _bufferDataList[index]; }
unsigned int getNumBufferData() const { return static_cast<unsigned int>(_bufferDataList.size()); }
void setGLBufferObject(unsigned int contextID, GLBufferObject* glbo) { _glBufferObjects[contextID] = glbo; }
GLBufferObject* getGLBufferObject(unsigned int contextID) const { return _glBufferObjects[contextID].get(); }
GLBufferObject* getOrCreateGLBufferObject(unsigned int contextID) const;
unsigned int computeRequiredBufferSize() const;
static void deleteBufferObject(unsigned int contextID,GLuint globj);
protected:
~BufferObject();
typedef std::vector< BufferData* > BufferDataList;
typedef osg::buffered_object< osg::ref_ptr<GLBufferObject> > GLBufferObjects;
BufferObjectProfile _profile;
bool _copyDataAndReleaseGLBufferObject;
BufferDataList _bufferDataList;
mutable GLBufferObjects _glBufferObjects;
};
class OSG_EXPORT BufferData : public Object
{
public:
BufferData():
Object(true),
_modifiedCount(0),
_bufferIndex(0),
_numClients(0) {}
BufferData(const BufferData& bd,const CopyOp& copyop=CopyOp::SHALLOW_COPY):
osg::Object(bd,copyop),
_modifiedCount(0),
_bufferIndex(0),
_modifiedCallback(bd._modifiedCallback),
_numClients(0) {}
virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast<const BufferData*>(obj)!=NULL; }
virtual const char* libraryName() const { return "osg"; }
virtual const char* className() const { return "BufferData"; }
virtual const GLvoid* getDataPointer() const = 0;
virtual unsigned int getTotalDataSize() const = 0;
virtual osg::Array* asArray() { return 0; }
virtual const osg::Array* asArray() const { return 0; }
virtual osg::PrimitiveSet* asPrimitiveSet() { return 0; }
virtual const osg::PrimitiveSet* asPrimitiveSet() const { return 0; }
virtual osg::Image* asImage() { return 0; }
virtual const osg::Image* asImage() const { return 0; }
void setBufferObject(BufferObject* bufferObject);
BufferObject* getBufferObject() { return _bufferObject.get(); }
const BufferObject* getBufferObject() const { return _bufferObject.get(); }
void setBufferIndex(unsigned int index) { _bufferIndex = index; }
unsigned int getBufferIndex() const { return _bufferIndex; }
GLBufferObject* getGLBufferObject(unsigned int contextID) const { return _bufferObject.valid() ? _bufferObject->getGLBufferObject(contextID) : 0; }
GLBufferObject* getOrCreateGLBufferObject(unsigned int contextID) const { return _bufferObject.valid() ? _bufferObject->getOrCreateGLBufferObject(contextID) : 0; }
struct ModifiedCallback : public virtual osg::Object
{
ModifiedCallback() {}
ModifiedCallback(const ModifiedCallback& org, const CopyOp& copyop) :
Object(org, copyop) {}
META_Object(osg,ModifiedCallback);
virtual void modified(BufferData* /*bufferData*/) const {}
};
void setModifiedCallback(ModifiedCallback* md) { _modifiedCallback = md; }
ModifiedCallback* getModifiedCallback() { return _modifiedCallback.get(); }
const ModifiedCallback* getModifiedCallback() const { return _modifiedCallback.get(); }
inline void dirty()
{
++_modifiedCount;
if (_modifiedCallback.valid()) _modifiedCallback->modified(this);
if (_bufferObject.valid()) _bufferObject->dirty();
}
inline void setModifiedCount(unsigned int value) { _modifiedCount=value; }
inline unsigned int getModifiedCount() const { return _modifiedCount; }
virtual void resizeGLObjectBuffers(unsigned int maxSize);
void releaseGLObjects(State* state=0) const;
unsigned int getNumClients() const { return _numClients; }
void addClient(osg::Object * /*client*/) { ++_numClients; }
void removeClient(osg::Object * /*client*/) { --_numClients; }
protected:
virtual ~BufferData();
unsigned int _modifiedCount;
unsigned int _bufferIndex;
osg::ref_ptr<BufferObject> _bufferObject;
osg::ref_ptr<ModifiedCallback> _modifiedCallback;
unsigned int _numClients;
};
class Array;
class OSG_EXPORT VertexBufferObject : public BufferObject
{
public:
VertexBufferObject();
VertexBufferObject(const VertexBufferObject& vbo,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg,VertexBufferObject);
unsigned int addArray(osg::Array* array);
void removeArray(osg::Array* array);
void setArray(unsigned int i, Array* array);
Array* getArray(unsigned int i);
const Array* getArray(unsigned int i) const;
protected:
virtual ~VertexBufferObject();
};
class DrawElements;
class OSG_EXPORT ElementBufferObject : public BufferObject
{
public:
ElementBufferObject();
ElementBufferObject(const ElementBufferObject& pbo,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg,ElementBufferObject);
unsigned int addDrawElements(osg::DrawElements* PrimitiveSet);
void removeDrawElements(osg::DrawElements* PrimitiveSet);
void setDrawElements(unsigned int i, DrawElements* PrimitiveSet);
DrawElements* getDrawElements(unsigned int i);
const DrawElements* getDrawElements(unsigned int i) const;
protected:
virtual ~ElementBufferObject();
};
class OSG_EXPORT DrawIndirectBufferObject : public BufferObject
{
public:
DrawIndirectBufferObject();
DrawIndirectBufferObject(const DrawIndirectBufferObject& vbo,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg,DrawIndirectBufferObject);
unsigned int addArray(osg::Array* array);
void removeArray(osg::Array* array);
void setArray(unsigned int i, Array* array);
Array* getArray(unsigned int i);
const Array* getArray(unsigned int i) const;
protected:
virtual ~DrawIndirectBufferObject();
};
class Image;
class OSG_EXPORT PixelBufferObject : public BufferObject
{
public:
PixelBufferObject(osg::Image* image=0);
PixelBufferObject(const PixelBufferObject& pbo,const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg,PixelBufferObject);
void setImage(osg::Image* image);
Image* getImage();
const Image* getImage() const;
bool isPBOSupported(unsigned int contextID) const { return _glBufferObjects[contextID]->isPBOSupported(); }
protected:
virtual ~PixelBufferObject();
};
class OSG_EXPORT PixelDataBufferObject : public BufferObject
{
public:
PixelDataBufferObject();
PixelDataBufferObject(const PixelDataBufferObject& pbo, const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg, PixelDataBufferObject);
inline void setDataSize(unsigned int size) { _profile._size = size; dirty(); }
inline unsigned int getDataSize() const { return _profile._size; }
virtual void compileBuffer(State& state) const;
virtual void bindBufferInReadMode(State& state);
virtual void bindBufferInWriteMode(State& state);
virtual void unbindBuffer(unsigned int contextID) const;
virtual void resizeGLObjectBuffers(unsigned int maxSize);
enum Mode
{
NONE = 0,
READ = 1,
WRITE = 2
};
Mode getMode(unsigned int contextID) const { return (Mode)_mode[contextID]; }
protected:
virtual ~PixelDataBufferObject();
typedef osg::buffered_value<unsigned int> ModeList;
mutable ModeList _mode;
};
class OSG_EXPORT UniformBufferObject : public BufferObject
{
public:
UniformBufferObject();
UniformBufferObject(const UniformBufferObject& ubo, const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg, UniformBufferObject);
protected:
virtual ~UniformBufferObject();
};
class OSG_EXPORT AtomicCounterBufferObject : public BufferObject
{
public:
AtomicCounterBufferObject();
AtomicCounterBufferObject(const AtomicCounterBufferObject& ubo, const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg, AtomicCounterBufferObject);
protected:
virtual ~AtomicCounterBufferObject();
};
inline void GLBufferObject::bindBuffer()
{
_extensions->glBindBuffer(_profile._target,_glObjectID);
if (_set) _set->moveToBack(this);
}
class OSG_EXPORT ShaderStorageBufferObject : public BufferObject
{
public:
ShaderStorageBufferObject();
ShaderStorageBufferObject(const ShaderStorageBufferObject& ubo, const CopyOp& copyop=CopyOp::SHALLOW_COPY);
META_Object(osg, ShaderStorageBufferObject);
protected:
virtual ~ShaderStorageBufferObject();
};
}
#endif
FrameStamp
GLExtensions
GLObjects
Object
buffered_value
OpenThreads::Mutex
This class provides an object-oriented thread mutex interface.
Definition Mutex:31
osg::Array
Definition Array:61
osg::AtomicCounterBufferObject::~AtomicCounterBufferObject
virtual ~AtomicCounterBufferObject()
osg::AtomicCounterBufferObject::META_Object
META_Object(osg, AtomicCounterBufferObject)
osg::AtomicCounterBufferObject::AtomicCounterBufferObject
AtomicCounterBufferObject(const AtomicCounterBufferObject &ubo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
osg::AtomicCounterBufferObject::AtomicCounterBufferObject
AtomicCounterBufferObject()
osg::BufferData
Definition BufferObject:495
osg::BufferData::addClient
void addClient(osg::Object *)
Definition BufferObject:579
osg::BufferData::getNumClients
unsigned int getNumClients() const
Definition BufferObject:577
osg::BufferData::asPrimitiveSet
virtual const osg::PrimitiveSet * asPrimitiveSet() const
Definition BufferObject:523
osg::BufferData::getBufferObject
BufferObject * getBufferObject()
Definition BufferObject:529
osg::BufferData::_numClients
unsigned int _numClients
Definition BufferObject:593
osg::BufferData::getBufferObject
const BufferObject * getBufferObject() const
Definition BufferObject:530
osg::BufferData::~BufferData
virtual ~BufferData()
osg::BufferData::_modifiedCallback
osg::ref_ptr< ModifiedCallback > _modifiedCallback
Definition BufferObject:591
osg::BufferData::asImage
virtual osg::Image * asImage()
Definition BufferObject:525
osg::BufferData::getGLBufferObject
GLBufferObject * getGLBufferObject(unsigned int contextID) const
Definition BufferObject:535
osg::BufferData::getModifiedCount
unsigned int getModifiedCount() const
Definition BufferObject:567
osg::BufferData::asArray
virtual osg::Array * asArray()
Definition BufferObject:519
osg::BufferData::getDataPointer
virtual const GLvoid * getDataPointer() const =0
osg::BufferData::asArray
virtual const osg::Array * asArray() const
Definition BufferObject:520
osg::BufferData::BufferData
BufferData()
Definition BufferObject:498
osg::BufferData::_bufferObject
osg::ref_ptr< BufferObject > _bufferObject
Definition BufferObject:590
osg::BufferData::isSameKindAs
virtual bool isSameKindAs(const Object *obj) const
Definition BufferObject:512
osg::BufferData::getModifiedCallback
const ModifiedCallback * getModifiedCallback() const
Definition BufferObject:552
osg::BufferData::asPrimitiveSet
virtual osg::PrimitiveSet * asPrimitiveSet()
Definition BufferObject:522
osg::BufferData::getTotalDataSize
virtual unsigned int getTotalDataSize() const =0
osg::BufferData::_modifiedCount
unsigned int _modifiedCount
Definition BufferObject:587
osg::BufferData::removeClient
void removeClient(osg::Object *)
Definition BufferObject:581
osg::BufferData::asImage
virtual const osg::Image * asImage() const
Definition BufferObject:526
osg::BufferData::getOrCreateGLBufferObject
GLBufferObject * getOrCreateGLBufferObject(unsigned int contextID) const
Definition BufferObject:536
osg::BufferData::dirty
void dirty()
Definition BufferObject:556
osg::BufferData::_bufferIndex
unsigned int _bufferIndex
Definition BufferObject:589
osg::BufferData::setModifiedCount
void setModifiedCount(unsigned int value)
Definition BufferObject:564
osg::BufferData::setModifiedCallback
void setModifiedCallback(ModifiedCallback *md)
Definition BufferObject:550
osg::BufferData::getModifiedCallback
ModifiedCallback * getModifiedCallback()
Definition BufferObject:551
osg::BufferData::getBufferIndex
unsigned int getBufferIndex() const
Definition BufferObject:533
osg::BufferData::libraryName
virtual const char * libraryName() const
Definition BufferObject:513
osg::BufferData::setBufferIndex
void setBufferIndex(unsigned int index)
Definition BufferObject:532
osg::BufferData::BufferData
BufferData(const BufferData &bd, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
Definition BufferObject:505
osg::BufferData::setBufferObject
void setBufferObject(BufferObject *bufferObject)
osg::BufferData::className
virtual const char * className() const
Definition BufferObject:514
osg::BufferData::resizeGLObjectBuffers
virtual void resizeGLObjectBuffers(unsigned int maxSize)
osg::BufferData::releaseGLObjects
void releaseGLObjects(State *state=0) const
osg::BufferObjectProfile
Definition BufferObject:98
osg::BufferObjectProfile::operator==
bool operator==(const BufferObjectProfile &rhs) const
Definition BufferObject:124
osg::BufferObjectProfile::operator<
bool operator<(const BufferObjectProfile &rhs) const
Definition BufferObject:115
osg::BufferObjectProfile::operator=
BufferObjectProfile & operator=(const BufferObjectProfile &rhs)
Definition BufferObject:138
osg::BufferObjectProfile::_size
GLenum _size
Definition BufferObject:148
osg::BufferObjectProfile::BufferObjectProfile
BufferObjectProfile()
Definition BufferObject:100
osg::BufferObjectProfile::setProfile
void setProfile(GLenum target, GLenum usage, unsigned int size)
Definition BufferObject:131
osg::BufferObjectProfile::BufferObjectProfile
BufferObjectProfile(GLenum target, GLenum usage, unsigned int size)
Definition BufferObject:105
osg::BufferObjectProfile::_target
GLenum _target
Definition BufferObject:146
osg::BufferObjectProfile::_usage
GLenum _usage
Definition BufferObject:147
osg::BufferObjectProfile::BufferObjectProfile
BufferObjectProfile(const BufferObjectProfile &bpo)
Definition BufferObject:110
osg::BufferObject
Definition BufferObject:411
osg::BufferObject::setTarget
void setTarget(GLenum target)
Definition BufferObject:423
osg::BufferObject::setBufferData
void setBufferData(unsigned int index, BufferData *bd)
osg::BufferObject::GLBufferObjects
osg::buffered_object< osg::ref_ptr< GLBufferObject > > GLBufferObjects
Definition BufferObject:483
osg::BufferObject::BufferDataList
std::vector< BufferData * > BufferDataList
Definition BufferObject:482
osg::BufferObject::setUsage
void setUsage(GLenum usage)
Definition BufferObject:431
osg::BufferObject::BufferObject
BufferObject(const BufferObject &bo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
osg::BufferObject::~BufferObject
~BufferObject()
osg::BufferObject::getGLBufferObject
GLBufferObject * getGLBufferObject(unsigned int contextID) const
Definition BufferObject:469
osg::BufferObject::isSameKindAs
virtual bool isSameKindAs(const Object *obj) const
Definition BufferObject:419
osg::BufferObject::getTarget
GLenum getTarget() const
Definition BufferObject:424
osg::BufferObject::_profile
BufferObjectProfile _profile
Definition BufferObject:485
osg::BufferObject::removeBufferData
void removeBufferData(BufferData *bd)
osg::BufferObject::deleteBufferObject
static void deleteBufferObject(unsigned int contextID, GLuint globj)
osg::BufferObject::dirty
void dirty()
osg::BufferObject::_bufferDataList
BufferDataList _bufferDataList
Definition BufferObject:489
osg::BufferObject::getUsage
GLenum getUsage() const
Definition BufferObject:434
osg::BufferObject::releaseGLObjects
void releaseGLObjects(State *state=0) const
osg::BufferObject::getNumBufferData
unsigned int getNumBufferData() const
Definition BufferObject:465
osg::BufferObject::getBufferData
BufferData * getBufferData(unsigned int index)
Definition BufferObject:462
osg::BufferObject::_glBufferObjects
GLBufferObjects _glBufferObjects
Definition BufferObject:491
osg::BufferObject::removeBufferData
void removeBufferData(unsigned int index)
osg::BufferObject::setGLBufferObject
void setGLBufferObject(unsigned int contextID, GLBufferObject *glbo)
Definition BufferObject:467
osg::BufferObject::getCopyDataAndReleaseGLBufferObject
bool getCopyDataAndReleaseGLBufferObject() const
Definition BufferObject:444
osg::BufferObject::getOrCreateGLBufferObject
GLBufferObject * getOrCreateGLBufferObject(unsigned int contextID) const
osg::BufferObject::getProfile
BufferObjectProfile & getProfile()
Definition BufferObject:436
osg::BufferObject::setCopyDataAndReleaseGLBufferObject
void setCopyDataAndReleaseGLBufferObject(bool copyAndRelease)
Definition BufferObject:441
osg::BufferObject::getProfile
const BufferObjectProfile & getProfile() const
Definition BufferObject:437
osg::BufferObject::_copyDataAndReleaseGLBufferObject
bool _copyDataAndReleaseGLBufferObject
Definition BufferObject:487
osg::BufferObject::resizeGLObjectBuffers
virtual void resizeGLObjectBuffers(unsigned int maxSize)
osg::BufferObject::className
virtual const char * className() const
Definition BufferObject:421
osg::BufferObject::computeRequiredBufferSize
unsigned int computeRequiredBufferSize() const
osg::BufferObject::getBufferData
const BufferData * getBufferData(unsigned int index) const
Definition BufferObject:463
osg::BufferObject::libraryName
virtual const char * libraryName() const
Definition BufferObject:420
osg::BufferObject::BufferObject
BufferObject()
osg::BufferObject::addBufferData
unsigned int addBufferData(BufferData *bd)
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::DrawElements
Definition PrimitiveSet:337
osg::DrawIndirectBufferObject::META_Object
META_Object(osg, DrawIndirectBufferObject)
osg::DrawIndirectBufferObject::removeArray
void removeArray(osg::Array *array)
osg::DrawIndirectBufferObject::setArray
void setArray(unsigned int i, Array *array)
osg::DrawIndirectBufferObject::~DrawIndirectBufferObject
virtual ~DrawIndirectBufferObject()
osg::DrawIndirectBufferObject::DrawIndirectBufferObject
DrawIndirectBufferObject(const DrawIndirectBufferObject &vbo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
osg::DrawIndirectBufferObject::addArray
unsigned int addArray(osg::Array *array)
osg::DrawIndirectBufferObject::getArray
Array * getArray(unsigned int i)
osg::DrawIndirectBufferObject::getArray
const Array * getArray(unsigned int i) const
osg::DrawIndirectBufferObject::DrawIndirectBufferObject
DrawIndirectBufferObject()
osg::ElementBufferObject::getDrawElements
const DrawElements * getDrawElements(unsigned int i) const
osg::ElementBufferObject::addDrawElements
unsigned int addDrawElements(osg::DrawElements *PrimitiveSet)
osg::ElementBufferObject::~ElementBufferObject
virtual ~ElementBufferObject()
osg::ElementBufferObject::removeDrawElements
void removeDrawElements(osg::DrawElements *PrimitiveSet)
osg::ElementBufferObject::ElementBufferObject
ElementBufferObject()
osg::ElementBufferObject::setDrawElements
void setDrawElements(unsigned int i, DrawElements *PrimitiveSet)
osg::ElementBufferObject::ElementBufferObject
ElementBufferObject(const ElementBufferObject &pbo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
osg::ElementBufferObject::getDrawElements
DrawElements * getDrawElements(unsigned int i)
osg::ElementBufferObject::META_Object
META_Object(osg, ElementBufferObject)
osg::FrameStamp
Definition FrameStamp:35
osg::GLBufferObjectManager
Definition BufferObject:332
osg::GLBufferObjectManager::generateGLBufferObject
osg::ref_ptr< GLBufferObject > generateGLBufferObject(const osg::BufferObject *bufferObject)
osg::GLBufferObjectManager::_maxGLBufferObjectPoolSize
unsigned int _maxGLBufferObjectPoolSize
Definition BufferObject:392
osg::GLBufferObjectManager::getCurrGLBufferObjectPoolSize
unsigned int & getCurrGLBufferObjectPoolSize()
Definition BufferObject:345
osg::GLBufferObjectManager::getCurrGLBufferObjectPoolSize
unsigned int getCurrGLBufferObjectPoolSize() const
Definition BufferObject:346
osg::GLBufferObjectManager::getGLBufferObjectSet
GLBufferObjectSet * getGLBufferObjectSet(const BufferObjectProfile &profile)
osg::GLBufferObjectManager::_deleteTime
double _deleteTime
Definition BufferObject:399
osg::GLBufferObjectManager::_glBufferObjectSetMap
GLBufferObjectSetMap _glBufferObjectSetMap
Definition BufferObject:393
osg::GLBufferObjectManager::discardAllDeletedGLObjects
void discardAllDeletedGLObjects()
osg::GLBufferObjectManager::hasSpace
bool hasSpace(unsigned int size) const
Definition BufferObject:351
osg::GLBufferObjectManager::getNumberApplied
unsigned int & getNumberApplied()
Definition BufferObject:380
osg::GLBufferObjectManager::getNumberOrphanedGLBufferObjects
unsigned int & getNumberOrphanedGLBufferObjects()
Definition BufferObject:341
osg::GLBufferObjectManager::setCurrGLBufferObjectPoolSize
void setCurrGLBufferObjectPoolSize(unsigned int size)
Definition BufferObject:344
osg::GLBufferObjectManager::_currGLBufferObjectPoolSize
unsigned int _currGLBufferObjectPoolSize
Definition BufferObject:391
osg::GLBufferObjectManager::_numGenerated
unsigned int _numGenerated
Definition BufferObject:401
osg::GLBufferObjectManager::getNumberOrphanedGLBufferObjects
unsigned int getNumberOrphanedGLBufferObjects() const
Definition BufferObject:342
osg::GLBufferObjectManager::_numActiveGLBufferObjects
unsigned int _numActiveGLBufferObjects
Definition BufferObject:389
osg::GLBufferObjectManager::getNumberDeleted
unsigned int & getNumberDeleted()
Definition BufferObject:374
osg::GLBufferObjectManager::_numDeleted
unsigned int _numDeleted
Definition BufferObject:398
osg::GLBufferObjectManager::_numFrames
unsigned int _numFrames
Definition BufferObject:397
osg::GLBufferObjectManager::GLBufferObjectManager
GLBufferObjectManager(unsigned int contextID)
osg::GLBufferObjectManager::setNumberActiveGLBufferObjects
void setNumberActiveGLBufferObjects(unsigned int size)
Definition BufferObject:336
osg::GLBufferObjectManager::getNumberGenerated
unsigned int & getNumberGenerated()
Definition BufferObject:377
osg::GLBufferObjectManager::setMaxGLBufferObjectPoolSize
void setMaxGLBufferObjectPoolSize(unsigned int size)
osg::GLBufferObjectManager::_applyTime
double _applyTime
Definition BufferObject:405
osg::GLBufferObjectManager::deleteAllGLObjects
void deleteAllGLObjects()
osg::GLBufferObjectManager::newFrame
void newFrame(osg::FrameStamp *fs)
osg::GLBufferObjectManager::getNumberActiveGLBufferObjects
unsigned int getNumberActiveGLBufferObjects() const
Definition BufferObject:338
osg::GLBufferObjectManager::getNumberFrames
unsigned int & getNumberFrames()
Definition BufferObject:372
osg::GLBufferObjectManager::getFrameNumber
unsigned int & getFrameNumber()
Definition BufferObject:371
osg::GLBufferObjectManager::flushAllDeletedGLObjects
void flushAllDeletedGLObjects()
osg::GLBufferObjectManager::_numOrphanedGLBufferObjects
unsigned int _numOrphanedGLBufferObjects
Definition BufferObject:390
osg::GLBufferObjectManager::getApplyTime
double & getApplyTime()
Definition BufferObject:381
osg::GLBufferObjectManager::getNumberActiveGLBufferObjects
unsigned int & getNumberActiveGLBufferObjects()
Definition BufferObject:337
osg::GLBufferObjectManager::handlePendingOrphandedGLBufferObjects
void handlePendingOrphandedGLBufferObjects()
osg::GLBufferObjectManager::discardAllGLObjects
void discardAllGLObjects()
osg::GLBufferObjectManager::recomputeStats
void recomputeStats(std::ostream &out) const
osg::GLBufferObjectManager::GLBufferObjectSetMap
std::map< BufferObjectProfile, osg::ref_ptr< GLBufferObjectSet > > GLBufferObjectSetMap
Definition BufferObject:387
osg::GLBufferObjectManager::flushDeletedGLObjects
void flushDeletedGLObjects(double currentTime, double &availableTime)
osg::GLBufferObjectManager::reportStats
void reportStats(std::ostream &out)
osg::GLBufferObjectManager::_numApplied
unsigned int _numApplied
Definition BufferObject:404
osg::GLBufferObjectManager::_frameNumber
unsigned int _frameNumber
Definition BufferObject:395
osg::GLBufferObjectManager::~GLBufferObjectManager
virtual ~GLBufferObjectManager()
osg::GLBufferObjectManager::resetStats
void resetStats()
osg::GLBufferObjectManager::getGenerateTime
double & getGenerateTime()
Definition BufferObject:378
osg::GLBufferObjectManager::makeSpace
bool makeSpace(unsigned int size)
osg::GLBufferObjectManager::getMaxGLBufferObjectPoolSize
unsigned int getMaxGLBufferObjectPoolSize() const
Definition BufferObject:349
osg::GLBufferObjectManager::_generateTime
double _generateTime
Definition BufferObject:402
osg::GLBufferObjectManager::getDeleteTime
double & getDeleteTime()
Definition BufferObject:375
osg::GLBufferObjectManager::setNumberOrphanedGLBufferObjects
void setNumberOrphanedGLBufferObjects(unsigned int size)
Definition BufferObject:340
osg::GLBufferObjectSet
Definition BufferObject:277
osg::GLBufferObjectSet::flushDeletedGLBufferObjects
void flushDeletedGLBufferObjects(double currentTime, double &availableTime)
osg::GLBufferObjectSet::remove
void remove(GLBufferObject *to)
osg::GLBufferObjectSet::takeFromOrphans
osg::ref_ptr< GLBufferObject > takeFromOrphans(BufferObject *bufferObject)
osg::GLBufferObjectSet::computeNumGLBufferObjectsInList
unsigned int computeNumGLBufferObjectsInList() const
osg::GLBufferObjectSet::_profile
BufferObjectProfile _profile
Definition BufferObject:322
osg::GLBufferObjectSet::deleteAllGLBufferObjects
void deleteAllGLBufferObjects()
osg::GLBufferObjectSet::_head
GLBufferObject * _head
Definition BufferObject:327
osg::GLBufferObjectSet::_pendingOrphanedGLBufferObjects
GLBufferObjectList _pendingOrphanedGLBufferObjects
Definition BufferObject:325
osg::GLBufferObjectSet::addToBack
void addToBack(GLBufferObject *to)
osg::GLBufferObjectSet::orphan
void orphan(GLBufferObject *to)
osg::GLBufferObjectSet::checkConsistency
bool checkConsistency() const
osg::GLBufferObjectSet::~GLBufferObjectSet
virtual ~GLBufferObjectSet()
osg::GLBufferObjectSet::getNumOrphans
unsigned int getNumOrphans() const
Definition BufferObject:310
osg::GLBufferObjectSet::_numOfGLBufferObjects
unsigned int _numOfGLBufferObjects
Definition BufferObject:323
osg::GLBufferObjectSet::moveToBack
void moveToBack(GLBufferObject *to)
osg::GLBufferObjectSet::flushAllDeletedGLBufferObjects
void flushAllDeletedGLBufferObjects()
osg::GLBufferObjectSet::GLBufferObjectSet
GLBufferObjectSet(GLBufferObjectManager *parent, const BufferObjectProfile &profile)
osg::GLBufferObjectSet::_orphanedGLBufferObjects
GLBufferObjectList _orphanedGLBufferObjects
Definition BufferObject:324
osg::GLBufferObjectSet::takeOrGenerate
osg::ref_ptr< GLBufferObject > takeOrGenerate(BufferObject *bufferObject)
osg::GLBufferObjectSet::getNumOfGLBufferObjects
unsigned int getNumOfGLBufferObjects() const
Definition BufferObject:309
osg::GLBufferObjectSet::_contextID
unsigned int _contextID
Definition BufferObject:321
osg::GLBufferObjectSet::discardAllGLBufferObjects
void discardAllGLBufferObjects()
osg::GLBufferObjectSet::_mutex
OpenThreads::Mutex _mutex
Definition BufferObject:318
osg::GLBufferObjectSet::discardAllDeletedGLBufferObjects
void discardAllDeletedGLBufferObjects()
osg::GLBufferObjectSet::getParent
GLBufferObjectManager * getParent()
Definition BufferObject:306
osg::GLBufferObjectSet::size
unsigned int size() const
Definition BufferObject:300
osg::GLBufferObjectSet::_parent
GLBufferObjectManager * _parent
Definition BufferObject:320
osg::GLBufferObjectSet::_tail
GLBufferObject * _tail
Definition BufferObject:328
osg::GLBufferObjectSet::getNumPendingOrphans
unsigned int getNumPendingOrphans() const
Definition BufferObject:311
osg::GLBufferObjectSet::moveToSet
void moveToSet(GLBufferObject *to, GLBufferObjectSet *set)
osg::GLBufferObjectSet::makeSpace
bool makeSpace(unsigned int &size)
osg::GLBufferObjectSet::handlePendingOrphandedGLBufferObjects
void handlePendingOrphandedGLBufferObjects()
osg::GLBufferObjectSet::getProfile
const BufferObjectProfile & getProfile() const
Definition BufferObject:281
osg::GLBufferObject
Definition BufferObject:164
osg::GLBufferObject::getGLObjectID
GLuint & getGLObjectID()
Definition BufferObject:208
osg::GLBufferObject::setBufferObject
void setBufferObject(BufferObject *bufferObject)
osg::GLBufferObject::setProfile
void setProfile(const BufferObjectProfile &profile)
Definition BufferObject:169
osg::GLBufferObject::dirty
void dirty()
Definition BufferObject:224
osg::GLBufferObject::~GLBufferObject
virtual ~GLBufferObject()
osg::GLBufferObject::getOffset
GLsizeiptr getOffset(unsigned int i) const
Definition BufferObject:210
osg::GLBufferObject::_allocatedSize
unsigned int _allocatedSize
Definition BufferObject:253
osg::GLBufferObject::GLBufferObject
GLBufferObject(unsigned int contextID, BufferObject *bufferObject, unsigned int glObjectID=0)
osg::GLBufferObject::compileBuffer
void compileBuffer()
osg::GLBufferObject::getProfile
const BufferObjectProfile & getProfile() const
Definition BufferObject:170
osg::GLBufferObject::unbindBuffer
void unbindBuffer()
Definition BufferObject:214
osg::GLBufferObject::setBufferDataHasBeenRead
void setBufferDataHasBeenRead(const osg::BufferData *bd)
osg::GLBufferObject::bindBuffer
void bindBuffer()
Definition BufferObject:771
osg::GLBufferObject::_bufferEntries
BufferEntries _bufferEntries
Definition BufferObject:258
osg::GLBufferObject::hasAllBufferDataBeenRead
bool hasAllBufferDataBeenRead() const
osg::GLBufferObject::isPBOSupported
bool isPBOSupported() const
Definition BufferObject:234
osg::GLBufferObject::_bufferObject
BufferObject * _bufferObject
Definition BufferObject:260
osg::GLBufferObject::_contextID
unsigned int _contextID
Definition BufferObject:249
osg::GLBufferObject::assign
void assign(BufferObject *bufferObject)
osg::GLBufferObject::_dirty
bool _dirty
Definition BufferObject:255
osg::GLBufferObject::_extensions
GLExtensions * _extensions
Definition BufferObject:270
osg::GLBufferObject::getGLObjectID
GLuint getGLObjectID() const
Definition BufferObject:209
osg::GLBufferObject::_profile
BufferObjectProfile _profile
Definition BufferObject:252
osg::GLBufferObject::getContextID
unsigned int getContextID() const
Definition BufferObject:206
osg::GLBufferObject::isDirty
bool isDirty() const
Definition BufferObject:222
osg::GLBufferObject::_set
GLBufferObjectSet * _set
Definition BufferObject:264
osg::GLBufferObject::_glObjectID
GLuint _glObjectID
Definition BufferObject:250
osg::GLBufferObject::BufferEntries
std::vector< BufferEntry > BufferEntries
Definition BufferObject:257
osg::GLBufferObject::computeBufferAlignment
unsigned int computeBufferAlignment(unsigned int pos, unsigned int bufferAlignment) const
Definition BufferObject:244
osg::GLBufferObject::_previous
GLBufferObject * _previous
Definition BufferObject:265
osg::GLBufferObject::release
void release()
osg::GLBufferObject::clear
void clear()
osg::GLBufferObject::_frameLastUsed
unsigned int _frameLastUsed
Definition BufferObject:267
osg::GLBufferObject::getBufferObject
BufferObject * getBufferObject()
Definition BufferObject:173
osg::GLBufferObject::_next
GLBufferObject * _next
Definition BufferObject:266
osg::GLBufferObject::deleteGLObject
void deleteGLObject()
osg::GLExtensions
Definition GLExtensions:169
osg::GraphicsObjectManager::GraphicsObjectManager
GraphicsObjectManager(const std::string &name, unsigned int contextID)
osg::GraphicsObject::GraphicsObject
GraphicsObject()
osg::Image
Definition Image:179
osg::Object
Definition Object:61
osg::Object::Object
Object()
Definition Object:69
osg::PixelBufferObject::setImage
void setImage(osg::Image *image)
osg::PixelBufferObject::getImage
const Image * getImage() const
osg::PixelBufferObject::PixelBufferObject
PixelBufferObject(const PixelBufferObject &pbo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
osg::PixelBufferObject::isPBOSupported
bool isPBOSupported(unsigned int contextID) const
Definition BufferObject:683
osg::PixelBufferObject::PixelBufferObject
PixelBufferObject(osg::Image *image=0)
osg::PixelBufferObject::META_Object
META_Object(osg, PixelBufferObject)
osg::PixelBufferObject::getImage
Image * getImage()
osg::PixelBufferObject::~PixelBufferObject
virtual ~PixelBufferObject()
osg::PixelDataBufferObject::~PixelDataBufferObject
virtual ~PixelDataBufferObject()
osg::PixelDataBufferObject::ModeList
osg::buffered_value< unsigned int > ModeList
Definition BufferObject:743
osg::PixelDataBufferObject::setDataSize
void setDataSize(unsigned int size)
Set new size of the buffer object. This will reallocate the memory on the next compile.
Definition BufferObject:705
osg::PixelDataBufferObject::Mode
Mode
Definition BufferObject:726
osg::PixelDataBufferObject::WRITE
@ WRITE
Buffer is in write mode (.
Definition BufferObject:734
osg::PixelDataBufferObject::NONE
@ NONE
A normal mode of this data buffer.
Definition BufferObject:728
osg::PixelDataBufferObject::READ
@ READ
Buffer is in read mode (.
Definition BufferObject:731
osg::PixelDataBufferObject::resizeGLObjectBuffers
virtual void resizeGLObjectBuffers(unsigned int maxSize)
osg::PixelDataBufferObject::getDataSize
unsigned int getDataSize() const
Get data size of the used buffer.
Definition BufferObject:708
osg::PixelDataBufferObject::compileBuffer
virtual void compileBuffer(State &state) const
Compile the buffer (reallocate the memory if buffer is dirty).
osg::PixelDataBufferObject::PixelDataBufferObject
PixelDataBufferObject(const PixelDataBufferObject &pbo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
osg::PixelDataBufferObject::META_Object
META_Object(osg, PixelDataBufferObject)
osg::PixelDataBufferObject::bindBufferInReadMode
virtual void bindBufferInReadMode(State &state)
Bind the buffer in read mode, which means that data can be downloaded from the buffer (note: GL_PIXEL...
osg::PixelDataBufferObject::getMode
Mode getMode(unsigned int contextID) const
Definition BufferObject:737
osg::PixelDataBufferObject::unbindBuffer
virtual void unbindBuffer(unsigned int contextID) const
Unbind the buffer.
osg::PixelDataBufferObject::bindBufferInWriteMode
virtual void bindBufferInWriteMode(State &state)
Bind the buffer in write mode, which means following OpenGL instructions will write data into the buf...
osg::PixelDataBufferObject::_mode
ModeList _mode
Definition BufferObject:745
osg::PixelDataBufferObject::PixelDataBufferObject
PixelDataBufferObject()
osg::PrimitiveSet
Definition PrimitiveSet:125
osg::Referenced::Referenced
Referenced()
osg::ShaderStorageBufferObject::ShaderStorageBufferObject
ShaderStorageBufferObject(const ShaderStorageBufferObject &ubo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
osg::ShaderStorageBufferObject::META_Object
META_Object(osg, ShaderStorageBufferObject)
osg::ShaderStorageBufferObject::ShaderStorageBufferObject
ShaderStorageBufferObject()
osg::ShaderStorageBufferObject::~ShaderStorageBufferObject
virtual ~ShaderStorageBufferObject()
osg::State
Definition State:80
osg::UniformBufferObject::UniformBufferObject
UniformBufferObject()
osg::UniformBufferObject::UniformBufferObject
UniformBufferObject(const UniformBufferObject &ubo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
osg::UniformBufferObject::~UniformBufferObject
virtual ~UniformBufferObject()
osg::UniformBufferObject::META_Object
META_Object(osg, UniformBufferObject)
osg::VertexBufferObject::~VertexBufferObject
virtual ~VertexBufferObject()
osg::VertexBufferObject::getArray
const Array * getArray(unsigned int i) const
osg::VertexBufferObject::removeArray
void removeArray(osg::Array *array)
osg::VertexBufferObject::addArray
unsigned int addArray(osg::Array *array)
osg::VertexBufferObject::getArray
Array * getArray(unsigned int i)
osg::VertexBufferObject::setArray
void setArray(unsigned int i, Array *array)
osg::VertexBufferObject::VertexBufferObject
VertexBufferObject()
osg::VertexBufferObject::META_Object
META_Object(osg, VertexBufferObject)
osg::VertexBufferObject::VertexBufferObject
VertexBufferObject(const VertexBufferObject &vbo, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
osg::buffered_object
Definition buffered_value:79
osg::buffered_value
Definition buffered_value:27
osg::ref_ptr
Definition ref_ptr:32
osg
Definition AlphaFunc:19
osg::GLBufferObjectList
std::list< ref_ptr< GLBufferObject > > GLBufferObjectList
Definition BufferObject:274
osg::computeBufferAlignment
unsigned int computeBufferAlignment(unsigned int pos, unsigned int bufferAlignment)
Definition BufferObject:155
osg::GLsizeiptr
ptrdiff_t GLsizeiptr
Definition GLDefines:691
NULL
#define NULL
Definition osg/Export:55
OSG_EXPORT
#define OSG_EXPORT
Definition osg/Export:39
osg::BufferData::ModifiedCallback
Definition BufferObject:539
osg::BufferData::ModifiedCallback::ModifiedCallback
ModifiedCallback()
Definition BufferObject:540
osg::BufferData::ModifiedCallback::ModifiedCallback
ModifiedCallback(const ModifiedCallback &org, const CopyOp &copyop)
Definition BufferObject:542
osg::BufferData::ModifiedCallback::META_Object
META_Object(osg, ModifiedCallback)
osg::BufferData::ModifiedCallback::modified
virtual void modified(BufferData *) const
Definition BufferObject:547
osg::GLBufferObject::BufferEntry::modifiedCount
unsigned int modifiedCount
Definition BufferObject:200
osg::GLBufferObject::BufferEntry::BufferEntry
BufferEntry(const BufferEntry &rhs)
Definition BufferObject:179
osg::GLBufferObject::BufferEntry::BufferEntry
BufferEntry()
Definition BufferObject:177
osg::GLBufferObject::BufferEntry::getNumClients
unsigned int getNumClients() const
osg::GLBufferObject::BufferEntry::dataSource
BufferData * dataSource
Definition BufferObject:203
osg::GLBufferObject::BufferEntry::numRead
unsigned int numRead
Definition BufferObject:199
osg::GLBufferObject::BufferEntry::offset
unsigned int offset
Definition BufferObject:202
osg::GLBufferObject::BufferEntry::dataSize
unsigned int dataSize
Definition BufferObject:201