30#include <Inventor/STL/limits>
31#include <Inventor/renderer/RendererResourceMacro.h>
35#pragma warning(disable:4251)
40class SoCpuBufferObjectCache;
47#define SO_BUFFER_SIZE_ALL ((std::numeric_limits<size_t>::max)())
410 void forceSize(
size_t size);
420 size_t startPosition,
size_t size);
423 void clearMappedBufferObject();
429 uint64_t getModificationsCounter()
const;
434 void incrementModificationsCounter()
const;
461 bool checkCopyConditions(
size_t sourceSize,
size_t sourceOffset,
462 size_t targetSize,
size_t targetOffset,
size_t copySize);
480 static SoCpuBufferObjectCache* s_bufferObjectCache;
#define SO_BUFFER_SIZE_ALL
Used to indicate that we want to use the whole buffer.
SO_PIMPL_BASE_PUBLIC_DECLARATION(SoImageDataAdapter)
#define SO_TYPED_CLASS_ABSTRACT_HEADER()
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
AccessMode
This enum provides the possible access modes for a mapped buffer object.
@ READ_ONLY
The target buffer initially has the same contents as the source buffer.
@ SET
The target buffer contents are initially undefined (although they may be the same as the source buffe...
@ READ_WRITE
The target buffer initially has the same contents as the source buffer and the source buffer will con...
virtual void map(SoBufferObject *targetBufferObject, AccessMode accessMode, size_t startPosition=0, size_t mappingSize=SO_BUFFER_SIZE_ALL)
Maps the current buffer object into the specified buffer object.
virtual void * map(AccessMode accessMode, size_t offset=0, size_t count=SO_BUFFER_SIZE_ALL)
Map the buffer to a system memory address and allows the mapping of a sub part of the buffer object i...
virtual size_t getSize() const
Returns the size, in bytes, of the buffer object.
virtual void unmap(SoBufferObject *bufferObject)
Unmap this buffer from the specified buffer object.
virtual void memcpy(SoBufferObject *sourceBufferObject, size_t destOffset=0, size_t sourceOffset=0, size_t copySize=SO_BUFFER_SIZE_ALL)
Copies data from the specified buffer object into this buffer object.
void unlockBuffer()
Unlocks the buffer object.
virtual void memset(void *value, size_t valueSize=1, size_t offset=0, size_t count=SO_BUFFER_SIZE_ALL)
This function sets the contents of (or a portion of) this buffer object to the specified value.
AccessMode getMappedBufferObjectAccessMode()
Returns the access mode used for the buffer mapping.
size_t getMappedBufferObjectSize() const
Returns the size of the mapped area in bytes.
size_t getMappedBufferObjectPosition() const
Returns the position in the source buffer mapped in this buffer.
virtual bool setSize(size_t size)
Sets the size in bytes of the buffer object.
SoDeviceContext * getContext() const
Returns the device context where this buffer is valid.
SoBufferObject * getMappedBufferObject() const
Returns a pointer to the buffer object which is mapped by the actual object.
virtual void unmap()
Unmaps the buffer from CPU address space.
static SoCpuBufferObjectCache * getBufferObjectCache()
Returns the cache manager object.
virtual SoBufferObject * createInstance() const =0
Create a new buffer with the same properties as the current one.
virtual void clearInstance()=0
Free the memory allocated by the buffer object.
void lockBuffer()
Locks the buffer against concurrent calls from different threads.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> CPU buffer objec...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Base class for ref-counted objects.
Base class for object storing runtime type information.