OgreHardwareBufferManager.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __HardwareBufferManager__
#define __HardwareBufferManager__
// Precompiler options
#include "OgrePrerequisites.h"
#include "OgreSingleton.h"
#include "OgreHardwareCounterBuffer.h"
#include "OgreHardwareIndexBuffer.h"
#include "OgreHardwareUniformBuffer.h"
#include "OgreHardwareVertexBuffer.h"
#include "OgreRenderToVertexBuffer.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
class _OgreExport HardwareBufferLicensee
{
public:
virtual ~HardwareBufferLicensee() { }
virtual void licenseExpired(HardwareBuffer* buffer) = 0;
};
class _OgreExport TempBlendedBufferInfo : public HardwareBufferLicensee, public BufferAlloc
{
private:
// Pre-blended
HardwareVertexBufferSharedPtr srcPositionBuffer;
HardwareVertexBufferSharedPtr srcNormalBuffer;
// Post-blended
HardwareVertexBufferSharedPtr destPositionBuffer;
HardwareVertexBufferSharedPtr destNormalBuffer;
bool posNormalShareBuffer;
unsigned short posBindIndex;
unsigned short normBindIndex;
bool bindPositions;
bool bindNormals;
public:
~TempBlendedBufferInfo(void);
void extractFrom(const VertexData* sourceData);
void checkoutTempCopies(bool positions = true, bool normals = true);
void bindTempCopies(VertexData* targetData, bool suppressHardwareUpload);
void licenseExpired(HardwareBuffer* buffer);
bool buffersCheckedOut(bool positions = true, bool normals = true) const;
};
class _OgreExport HardwareBufferManagerBase : public BufferAlloc
{
friend class HardwareVertexBufferSharedPtr;
friend class HardwareIndexBufferSharedPtr;
protected:
typedef set<HardwareVertexBuffer*>::type VertexBufferList;
typedef set<HardwareIndexBuffer*>::type IndexBufferList;
typedef set<HardwareUniformBuffer*>::type UniformBufferList;
typedef set<HardwareCounterBuffer*>::type CounterBufferList;
VertexBufferList mVertexBuffers;
IndexBufferList mIndexBuffers;
UniformBufferList mUniformBuffers;
CounterBufferList mCounterBuffers;
typedef set<VertexDeclaration*>::type VertexDeclarationList;
typedef set<VertexBufferBinding*>::type VertexBufferBindingList;
VertexDeclarationList mVertexDeclarations;
VertexBufferBindingList mVertexBufferBindings;
// Mutexes
OGRE_MUTEX(mVertexBuffersMutex);
OGRE_MUTEX(mIndexBuffersMutex);
OGRE_MUTEX(mUniformBuffersMutex);
OGRE_MUTEX(mCounterBuffersMutex);
OGRE_MUTEX(mVertexDeclarationsMutex);
OGRE_MUTEX(mVertexBufferBindingsMutex);
virtual void destroyAllDeclarations(void);
virtual void destroyAllBindings(void);
virtual VertexDeclaration* createVertexDeclarationImpl(void);
virtual void destroyVertexDeclarationImpl(VertexDeclaration* decl);
virtual VertexBufferBinding* createVertexBufferBindingImpl(void);
virtual void destroyVertexBufferBindingImpl(VertexBufferBinding* binding);
public:
enum BufferLicenseType
{
BLT_MANUAL_RELEASE,
BLT_AUTOMATIC_RELEASE
};
protected:
class _OgrePrivate VertexBufferLicense
{
public:
HardwareVertexBuffer* originalBufferPtr;
BufferLicenseType licenseType;
size_t expiredDelay;
HardwareVertexBufferSharedPtr buffer;
HardwareBufferLicensee* licensee;
VertexBufferLicense(
HardwareVertexBuffer* orig,
BufferLicenseType ltype,
size_t delay,
HardwareVertexBufferSharedPtr buf,
HardwareBufferLicensee* lic)
: originalBufferPtr(orig)
, licenseType(ltype)
, expiredDelay(delay)
, buffer(buf)
, licensee(lic)
{}
};
typedef multimap<HardwareVertexBuffer*, HardwareVertexBufferSharedPtr>::type FreeTemporaryVertexBufferMap;
FreeTemporaryVertexBufferMap mFreeTempVertexBufferMap;
typedef map<HardwareVertexBuffer*, VertexBufferLicense>::type TemporaryVertexBufferLicenseMap;
TemporaryVertexBufferLicenseMap mTempVertexBufferLicenses;
size_t mUnderUsedFrameCount;
static const size_t UNDER_USED_FRAME_THRESHOLD;
static const size_t EXPIRED_DELAY_FRAME_THRESHOLD;
// Mutexes
OGRE_MUTEX(mTempBuffersMutex);
virtual HardwareVertexBufferSharedPtr makeBufferCopy(
const HardwareVertexBufferSharedPtr& source,
HardwareBuffer::Usage usage, bool useShadowBuffer);
public:
HardwareBufferManagerBase();
virtual ~HardwareBufferManagerBase();
virtual HardwareVertexBufferSharedPtr
createVertexBuffer(size_t vertexSize, size_t numVerts, HardwareBuffer::Usage usage,
bool useShadowBuffer = false) = 0;
virtual HardwareIndexBufferSharedPtr
createIndexBuffer(HardwareIndexBuffer::IndexType itype, size_t numIndexes,
HardwareBuffer::Usage usage, bool useShadowBuffer = false) = 0;
virtual RenderToVertexBufferSharedPtr createRenderToVertexBuffer() = 0;
virtual HardwareUniformBufferSharedPtr createUniformBuffer(size_t sizeBytes,
HardwareBuffer::Usage usage = HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE,
bool useShadowBuffer = false, const String& name = "") = 0;
virtual HardwareCounterBufferSharedPtr createCounterBuffer(size_t sizeBytes,
HardwareBuffer::Usage usage = HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE,
bool useShadowBuffer = false, const String& name = "") = 0;
virtual VertexDeclaration* createVertexDeclaration(void);
virtual void destroyVertexDeclaration(VertexDeclaration* decl);
virtual VertexBufferBinding* createVertexBufferBinding(void);
virtual void destroyVertexBufferBinding(VertexBufferBinding* binding);
virtual void registerVertexBufferSourceAndCopy(
const HardwareVertexBufferSharedPtr& sourceBuffer,
const HardwareVertexBufferSharedPtr& copy);
virtual HardwareVertexBufferSharedPtr allocateVertexBufferCopy(
const HardwareVertexBufferSharedPtr& sourceBuffer,
BufferLicenseType licenseType,
HardwareBufferLicensee* licensee,
bool copyData = false);
virtual void releaseVertexBufferCopy(
const HardwareVertexBufferSharedPtr& bufferCopy);
virtual void touchVertexBufferCopy(const HardwareVertexBufferSharedPtr& bufferCopy);
virtual void _freeUnusedBufferCopies(void);
virtual void _releaseBufferCopies(bool forceFreeUnused = false);
virtual void _forceReleaseBufferCopies(const HardwareVertexBufferSharedPtr& sourceBuffer);
virtual void _forceReleaseBufferCopies(HardwareVertexBuffer* sourceBuffer);
void _notifyVertexBufferDestroyed(HardwareVertexBuffer* buf);
void _notifyIndexBufferDestroyed(HardwareIndexBuffer* buf);
void _notifyUniformBufferDestroyed(HardwareUniformBuffer* buf);
void _notifyCounterBufferDestroyed(HardwareCounterBuffer* buf);
};
class _OgreExport HardwareBufferManager : public HardwareBufferManagerBase, public Singleton<HardwareBufferManager>
{
friend class HardwareVertexBufferSharedPtr;
friend class HardwareIndexBufferSharedPtr;
protected:
HardwareBufferManagerBase* mImpl;
public:
HardwareBufferManager(HardwareBufferManagerBase* imp);
~HardwareBufferManager();
HardwareVertexBufferSharedPtr
createVertexBuffer(size_t vertexSize, size_t numVerts, HardwareBuffer::Usage usage,
bool useShadowBuffer = false)
{
return mImpl->createVertexBuffer(vertexSize, numVerts, usage, useShadowBuffer);
}
HardwareIndexBufferSharedPtr
createIndexBuffer(HardwareIndexBuffer::IndexType itype, size_t numIndexes,
HardwareBuffer::Usage usage, bool useShadowBuffer = false)
{
return mImpl->createIndexBuffer(itype, numIndexes, usage, useShadowBuffer);
}
RenderToVertexBufferSharedPtr createRenderToVertexBuffer()
{
return mImpl->createRenderToVertexBuffer();
}
HardwareUniformBufferSharedPtr
createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name = "")
{
return mImpl->createUniformBuffer(sizeBytes, usage, useShadowBuffer, name);
}
HardwareCounterBufferSharedPtr
createCounterBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, const String& name = "")
{
return mImpl->createCounterBuffer(sizeBytes, usage, useShadowBuffer, name);
}
virtual VertexDeclaration* createVertexDeclaration(void)
{
return mImpl->createVertexDeclaration();
}
virtual void destroyVertexDeclaration(VertexDeclaration* decl)
{
mImpl->destroyVertexDeclaration(decl);
}
virtual VertexBufferBinding* createVertexBufferBinding(void)
{
return mImpl->createVertexBufferBinding();
}
virtual void destroyVertexBufferBinding(VertexBufferBinding* binding)
{
mImpl->destroyVertexBufferBinding(binding);
}
virtual void registerVertexBufferSourceAndCopy(
const HardwareVertexBufferSharedPtr& sourceBuffer,
const HardwareVertexBufferSharedPtr& copy)
{
mImpl->registerVertexBufferSourceAndCopy(sourceBuffer, copy);
}
virtual HardwareVertexBufferSharedPtr allocateVertexBufferCopy(
const HardwareVertexBufferSharedPtr& sourceBuffer,
BufferLicenseType licenseType,
HardwareBufferLicensee* licensee,
bool copyData = false)
{
return mImpl->allocateVertexBufferCopy(sourceBuffer, licenseType, licensee, copyData);
}
virtual void releaseVertexBufferCopy(
const HardwareVertexBufferSharedPtr& bufferCopy)
{
mImpl->releaseVertexBufferCopy(bufferCopy);
}
virtual void touchVertexBufferCopy(
const HardwareVertexBufferSharedPtr& bufferCopy)
{
mImpl->touchVertexBufferCopy(bufferCopy);
}
virtual void _freeUnusedBufferCopies(void)
{
mImpl->_freeUnusedBufferCopies();
}
virtual void _releaseBufferCopies(bool forceFreeUnused = false)
{
mImpl->_releaseBufferCopies(forceFreeUnused);
}
virtual void _forceReleaseBufferCopies(
const HardwareVertexBufferSharedPtr& sourceBuffer)
{
mImpl->_forceReleaseBufferCopies(sourceBuffer);
}
virtual void _forceReleaseBufferCopies(HardwareVertexBuffer* sourceBuffer)
{
mImpl->_forceReleaseBufferCopies(sourceBuffer);
}
void _notifyVertexBufferDestroyed(HardwareVertexBuffer* buf)
{
mImpl->_notifyVertexBufferDestroyed(buf);
}
void _notifyIndexBufferDestroyed(HardwareIndexBuffer* buf)
{
mImpl->_notifyIndexBufferDestroyed(buf);
}
void _notifyUniformBufferDestroyed(HardwareUniformBuffer* buf)
{
mImpl->_notifyUniformBufferDestroyed(buf);
}
void _notifyConterBufferDestroyed(HardwareCounterBuffer* buf)
{
mImpl->_notifyCounterBufferDestroyed(buf);
}
static HardwareBufferManager& getSingleton(void);
static HardwareBufferManager* getSingletonPtr(void);
};
} // namespace Ogre
#include "OgreHeaderSuffix.h"
#endif // __HardwareBufferManager__
Ogre::HardwareBufferManager::createCounterBuffer
HardwareCounterBufferSharedPtr createCounterBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, const String &name="")
Create counter buffer.
Definition: OgreHardwareBufferManager.h:469
Ogre::TempBlendedBufferInfo::bindNormals
bool bindNormals
Definition: OgreHardwareBufferManager.h:85
Ogre::HardwareBufferManager::_notifyConterBufferDestroyed
void _notifyConterBufferDestroyed(HardwareCounterBuffer *buf)
Definition: OgreHardwareBufferManager.h:562
Ogre::HardwareBufferManagerBase::_notifyCounterBufferDestroyed
void _notifyCounterBufferDestroyed(HardwareCounterBuffer *buf)
Notification that at hardware counter buffer has been destroyed.
Ogre::HardwareBufferManagerBase::VertexBufferLicense::originalBufferPtr
HardwareVertexBuffer * originalBufferPtr
Definition: OgreHardwareBufferManager.h:176
Ogre::HardwareBufferManager::createVertexBufferBinding
virtual VertexBufferBinding * createVertexBufferBinding(void)
Creates a new VertexBufferBinding.
Definition: OgreHardwareBufferManager.h:486
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::HardwareBufferLicensee::~HardwareBufferLicensee
virtual ~HardwareBufferLicensee()
Definition: OgreHardwareBufferManager.h:63
Ogre::HardwareBufferManager::_notifyVertexBufferDestroyed
void _notifyVertexBufferDestroyed(HardwareVertexBuffer *buf)
Notification that a hardware vertex buffer has been destroyed.
Definition: OgreHardwareBufferManager.h:547
Ogre::HardwareIndexBufferSharedPtr
Shared pointer implementation used to share index buffers.
Definition: OgreHardwareIndexBuffer.h:79
Ogre::HardwareBufferManagerBase::createIndexBuffer
virtual HardwareIndexBufferSharedPtr createIndexBuffer(HardwareIndexBuffer::IndexType itype, size_t numIndexes, HardwareBuffer::Usage usage, bool useShadowBuffer=false)=0
Create a hardware index buffer.
Ogre::HardwareBufferManagerBase::touchVertexBufferCopy
virtual void touchVertexBufferCopy(const HardwareVertexBufferSharedPtr &bufferCopy)
Tell engine that the vertex buffer copy intent to reuse.
Ogre::VertexData
Summary class collecting together vertex source information.
Definition: OgreVertexIndexData.h:49
Ogre::HardwareBufferManager::_notifyIndexBufferDestroyed
void _notifyIndexBufferDestroyed(HardwareIndexBuffer *buf)
Notification that a hardware index buffer has been destroyed.
Definition: OgreHardwareBufferManager.h:552
Ogre::HardwareBufferManager::createUniformBuffer
HardwareUniformBufferSharedPtr createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage, bool useShadowBuffer, const String &name="")
Create uniform buffer.
Definition: OgreHardwareBufferManager.h:462
Ogre::HardwareBufferManager::createIndexBuffer
HardwareIndexBufferSharedPtr createIndexBuffer(HardwareIndexBuffer::IndexType itype, size_t numIndexes, HardwareBuffer::Usage usage, bool useShadowBuffer=false)
Create a hardware index buffer.
Definition: OgreHardwareBufferManager.h:448
Ogre::HardwareBufferManagerBase::VertexBufferBindingList
set< VertexBufferBinding * >::type VertexBufferBindingList
Definition: OgreHardwareBufferManager.h:134
OgreRenderToVertexBuffer.h
Ogre::HardwareVertexBuffer
Specialisation of HardwareBuffer for a vertex buffer.
Definition: OgreHardwareVertexBuffer.h:48
Ogre::TempBlendedBufferInfo
Structure for recording the use of temporary blend buffers.
Definition: OgreHardwareBufferManager.h:71
Ogre::HardwareBufferManager::releaseVertexBufferCopy
virtual void releaseVertexBufferCopy(const HardwareVertexBufferSharedPtr &bufferCopy)
Manually release a vertex buffer copy for others to subsequently use.
Definition: OgreHardwareBufferManager.h:512
Ogre::HardwareBufferManager::allocateVertexBufferCopy
virtual HardwareVertexBufferSharedPtr allocateVertexBufferCopy(const HardwareVertexBufferSharedPtr &sourceBuffer, BufferLicenseType licenseType, HardwareBufferLicensee *licensee, bool copyData=false)
Allocates a copy of a given vertex buffer.
Definition: OgreHardwareBufferManager.h:503
OgreHardwareIndexBuffer.h
Ogre::HardwareBufferManagerBase::mVertexBufferBindings
VertexBufferBindingList mVertexBufferBindings
Definition: OgreHardwareBufferManager.h:136
Ogre::HardwareBufferManagerBase::UNDER_USED_FRAME_THRESHOLD
static const size_t UNDER_USED_FRAME_THRESHOLD
Number of frames to wait before free unused temporary buffers.
Definition: OgreHardwareBufferManager.h:207
Ogre::HardwareBufferManager
Singleton wrapper for hardware buffer manager.
Definition: OgreHardwareBufferManager.h:429
OGRE_MUTEX
#define OGRE_MUTEX(name)
Definition: OgreThreadDefinesBoost.h:47
Ogre::HardwareBufferManagerBase::VertexBufferLicense
Struct holding details of a license to use a temporary shared buffer.
Definition: OgreHardwareBufferManager.h:173
Ogre::HardwareBufferManager::_freeUnusedBufferCopies
virtual void _freeUnusedBufferCopies(void)
Free all unused vertex buffer copies.
Definition: OgreHardwareBufferManager.h:526
Ogre::HardwareBufferManagerBase::mTempVertexBufferLicenses
TemporaryVertexBufferLicenseMap mTempVertexBufferLicenses
Map of currently licensed temporary buffers.
Definition: OgreHardwareBufferManager.h:203
Ogre::HardwareIndexBuffer
Specialisation of HardwareBuffer for vertex index buffers, still abstract.
Definition: OgreHardwareIndexBuffer.h:46
Ogre::HardwareBufferManagerBase::VertexBufferLicense::licenseType
BufferLicenseType licenseType
Definition: OgreHardwareBufferManager.h:177
Ogre::HardwareBufferManagerBase::destroyVertexDeclaration
virtual void destroyVertexDeclaration(VertexDeclaration *decl)
Destroys a vertex declaration.
Ogre::HardwareBufferManager::registerVertexBufferSourceAndCopy
virtual void registerVertexBufferSourceAndCopy(const HardwareVertexBufferSharedPtr &sourceBuffer, const HardwareVertexBufferSharedPtr &copy)
Registers a vertex buffer as a copy of another.
Definition: OgreHardwareBufferManager.h:496
Ogre::HardwareBufferManager::_releaseBufferCopies
virtual void _releaseBufferCopies(bool forceFreeUnused=false)
Internal method for releasing all temporary buffers which have been allocated using BLT_AUTOMATIC_REL...
Definition: OgreHardwareBufferManager.h:531
Ogre::HardwareBufferManagerBase::releaseVertexBufferCopy
virtual void releaseVertexBufferCopy(const HardwareVertexBufferSharedPtr &bufferCopy)
Manually release a vertex buffer copy for others to subsequently use.
Ogre::HardwareBufferManagerBase::_notifyUniformBufferDestroyed
void _notifyUniformBufferDestroyed(HardwareUniformBuffer *buf)
Notification that at hardware uniform buffer has been destroyed.
Ogre::HardwareBufferManagerBase::BLT_MANUAL_RELEASE
Licensee will only release buffer when it says so.
Definition: OgreHardwareBufferManager.h:166
Ogre::TempBlendedBufferInfo::srcNormalBuffer
HardwareVertexBufferSharedPtr srcNormalBuffer
Definition: OgreHardwareBufferManager.h:76
Ogre::HardwareCounterBufferSharedPtr
Shared pointer implementation used to share counter buffers.
Definition: OgreHardwareCounterBuffer.h:68
Ogre::HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE
Combination of HBU_DYNAMIC, HBU_WRITE_ONLY and HBU_DISCARDABLE.
Definition: OgreHardwareBuffer.h:116
Ogre::HardwareCounterBuffer
Specialisation of HardwareBuffer for a counter buffer.
Definition: OgreHardwareCounterBuffer.h:49
Ogre::HardwareUniformBuffer
Specialisation of HardwareBuffer for a uniform buffer.
Definition: OgreHardwareUniformBuffer.h:49
Ogre::HardwareBufferManager::_notifyUniformBufferDestroyed
void _notifyUniformBufferDestroyed(HardwareUniformBuffer *buf)
Definition: OgreHardwareBufferManager.h:557
OgreSingleton.h
Ogre::VertexDeclaration
This class declares the format of a set of vertex inputs, which can be issued to the rendering API th...
Definition: OgreHardwareVertexBuffer.h:337
Ogre::HardwareVertexBufferSharedPtr
Shared pointer implementation used to share vertex buffers.
Definition: OgreHardwareVertexBuffer.h:86
Ogre::HardwareBufferManagerBase::VertexDeclarationList
set< VertexDeclaration * >::type VertexDeclarationList
Definition: OgreHardwareBufferManager.h:133
Ogre::TempBlendedBufferInfo::normBindIndex
unsigned short normBindIndex
Definition: OgreHardwareBufferManager.h:83
OgrePrerequisites.h
Ogre::HardwareBufferManager::mImpl
HardwareBufferManagerBase * mImpl
Definition: OgreHardwareBufferManager.h:434
Ogre::HardwareBufferManager::createVertexDeclaration
virtual VertexDeclaration * createVertexDeclaration(void)
Definition: OgreHardwareBufferManager.h:475
Ogre::HardwareBufferManagerBase
Base definition of a hardware buffer manager.
Definition: OgreHardwareBufferManager.h:113
_OgrePrivate
#define _OgrePrivate
Definition: OgrePlatform.h:258
Ogre::HardwareBufferManagerBase::allocateVertexBufferCopy
virtual HardwareVertexBufferSharedPtr allocateVertexBufferCopy(const HardwareVertexBufferSharedPtr &sourceBuffer, BufferLicenseType licenseType, HardwareBufferLicensee *licensee, bool copyData=false)
Allocates a copy of a given vertex buffer.
Ogre::HardwareBufferManagerBase::mUniformBuffers
UniformBufferList mUniformBuffers
Definition: OgreHardwareBufferManager.h:129
Ogre::HardwareBufferManagerBase::FreeTemporaryVertexBufferMap
multimap< HardwareVertexBuffer *, HardwareVertexBufferSharedPtr >::type FreeTemporaryVertexBufferMap
Map from original buffer to temporary buffers.
Definition: OgreHardwareBufferManager.h:197
Ogre::HardwareBufferManagerBase::VertexBufferList
set< HardwareVertexBuffer * >::type VertexBufferList
WARNING: The following two members should place before all other members.
Definition: OgreHardwareBufferManager.h:123
Ogre::HardwareBufferManager::touchVertexBufferCopy
virtual void touchVertexBufferCopy(const HardwareVertexBufferSharedPtr &bufferCopy)
Tell engine that the vertex buffer copy intent to reuse.
Definition: OgreHardwareBufferManager.h:519
Ogre::HardwareBufferManagerBase::CounterBufferList
set< HardwareCounterBuffer * >::type CounterBufferList
Definition: OgreHardwareBufferManager.h:126
Ogre::HardwareBuffer::Usage
Usage
Enums describing buffer usage; not mutually exclusive.
Definition: OgreHardwareBuffer.h:79
OgreHardwareVertexBuffer.h
Ogre::HardwareBufferManager::_forceReleaseBufferCopies
virtual void _forceReleaseBufferCopies(const HardwareVertexBufferSharedPtr &sourceBuffer)
Internal method that forces the release of copies of a given buffer.
Definition: OgreHardwareBufferManager.h:536
Ogre::HardwareBufferManagerBase::VertexBufferLicense::licensee
HardwareBufferLicensee * licensee
Definition: OgreHardwareBufferManager.h:180
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::HardwareBuffer
Abstract class defining common features of hardware buffers.
Definition: OgreHardwareBuffer.h:74
Ogre::HardwareBufferManager::_forceReleaseBufferCopies
virtual void _forceReleaseBufferCopies(HardwareVertexBuffer *sourceBuffer)
Internal method that forces the release of copies of a given buffer.
Definition: OgreHardwareBufferManager.h:542
Ogre::HardwareBufferManagerBase::createVertexDeclaration
virtual VertexDeclaration * createVertexDeclaration(void)
Creates a new vertex declaration.
Ogre::set
Definition: OgrePrerequisites.h:519
Ogre::TempBlendedBufferInfo::srcPositionBuffer
HardwareVertexBufferSharedPtr srcPositionBuffer
Definition: OgreHardwareBufferManager.h:75
Ogre::HardwareIndexBuffer::IndexType
IndexType
Definition: OgreHardwareIndexBuffer.h:49
OgreHeaderSuffix.h
Ogre::HardwareBufferLicensee
Abstract interface representing a &#39;licensee&#39; of a hardware buffer copy.
Definition: OgreHardwareBufferManager.h:60
Ogre::HardwareBufferManager::createVertexBuffer
HardwareVertexBufferSharedPtr createVertexBuffer(size_t vertexSize, size_t numVerts, HardwareBuffer::Usage usage, bool useShadowBuffer=false)
Create a hardware vertex buffer.
Definition: OgreHardwareBufferManager.h:441
Ogre::HardwareBufferManagerBase::_freeUnusedBufferCopies
virtual void _freeUnusedBufferCopies(void)
Free all unused vertex buffer copies.
Ogre::VertexBufferBinding
Records the state of all the vertex buffer bindings required to provide a vertex declaration with the...
Definition: OgreHardwareVertexBuffer.h:521
Ogre::TempBlendedBufferInfo::destNormalBuffer
HardwareVertexBufferSharedPtr destNormalBuffer
Definition: OgreHardwareBufferManager.h:79
Ogre::TempBlendedBufferInfo::destPositionBuffer
HardwareVertexBufferSharedPtr destPositionBuffer
Definition: OgreHardwareBufferManager.h:78
Ogre::HardwareBufferManager::createRenderToVertexBuffer
RenderToVertexBufferSharedPtr createRenderToVertexBuffer()
Create a render to vertex buffer.
Definition: OgreHardwareBufferManager.h:455
Ogre::TempBlendedBufferInfo::posBindIndex
unsigned short posBindIndex
Definition: OgreHardwareBufferManager.h:82
Ogre::HardwareBufferManagerBase::mUnderUsedFrameCount
size_t mUnderUsedFrameCount
Number of frames elapsed since temporary buffers utilization was above half the available.
Definition: OgreHardwareBufferManager.h:205
Ogre::HardwareBufferManagerBase::UniformBufferList
set< HardwareUniformBuffer * >::type UniformBufferList
Definition: OgreHardwareBufferManager.h:125
Ogre::HardwareBufferManagerBase::mVertexBuffers
VertexBufferList mVertexBuffers
Definition: OgreHardwareBufferManager.h:127
Ogre::HardwareBufferManagerBase::_releaseBufferCopies
virtual void _releaseBufferCopies(bool forceFreeUnused=false)
Internal method for releasing all temporary buffers which have been allocated using BLT_AUTOMATIC_REL...
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::HardwareBufferManagerBase::VertexBufferLicense::expiredDelay
size_t expiredDelay
Definition: OgreHardwareBufferManager.h:178
Ogre::HardwareBufferManagerBase::createCounterBuffer
virtual HardwareCounterBufferSharedPtr createCounterBuffer(size_t sizeBytes, HardwareBuffer::Usage usage=HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE, bool useShadowBuffer=false, const String &name="")=0
Create counter buffer.
Ogre::HardwareBufferManagerBase::mCounterBuffers
CounterBufferList mCounterBuffers
Definition: OgreHardwareBufferManager.h:130
Ogre::HardwareBufferManagerBase::BufferLicenseType
BufferLicenseType
Definition: OgreHardwareBufferManager.h:163
Ogre::SharedPtr
Reference-counted shared pointer, used for objects where implicit destruction is required.
Definition: OgrePrerequisites.h:310
Ogre::HardwareBufferManagerBase::createVertexBufferBinding
virtual VertexBufferBinding * createVertexBufferBinding(void)
Creates a new VertexBufferBinding.
Ogre::HardwareBufferManagerBase::EXPIRED_DELAY_FRAME_THRESHOLD
static const size_t EXPIRED_DELAY_FRAME_THRESHOLD
Frame delay for BLT_AUTOMATIC_RELEASE temporary buffers.
Definition: OgreHardwareBufferManager.h:209
Ogre::TempBlendedBufferInfo::bindPositions
bool bindPositions
Definition: OgreHardwareBufferManager.h:84
OgreHeaderPrefix.h
Ogre::HardwareBufferManagerBase::mIndexBuffers
IndexBufferList mIndexBuffers
Definition: OgreHardwareBufferManager.h:128
Ogre::HardwareBufferManagerBase::createUniformBuffer
virtual HardwareUniformBufferSharedPtr createUniformBuffer(size_t sizeBytes, HardwareBuffer::Usage usage=HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE, bool useShadowBuffer=false, const String &name="")=0
Create uniform buffer.
Ogre::HardwareBufferManagerBase::mFreeTempVertexBufferMap
FreeTemporaryVertexBufferMap mFreeTempVertexBufferMap
Map of current available temp buffers.
Definition: OgreHardwareBufferManager.h:199
Ogre::Singleton
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:64
Ogre::HardwareBufferManagerBase::TemporaryVertexBufferLicenseMap
map< HardwareVertexBuffer *, VertexBufferLicense >::type TemporaryVertexBufferLicenseMap
Map from temporary buffer to details of a license.
Definition: OgreHardwareBufferManager.h:201
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::HardwareBufferManagerBase::IndexBufferList
set< HardwareIndexBuffer * >::type IndexBufferList
Definition: OgreHardwareBufferManager.h:124
OgreHardwareCounterBuffer.h
Ogre::HardwareBufferManagerBase::_notifyVertexBufferDestroyed
void _notifyVertexBufferDestroyed(HardwareVertexBuffer *buf)
Notification that a hardware vertex buffer has been destroyed.
OgreHardwareUniformBuffer.h
Ogre::HardwareBufferManager::destroyVertexDeclaration
virtual void destroyVertexDeclaration(VertexDeclaration *decl)
Destroys a vertex declaration.
Definition: OgreHardwareBufferManager.h:480
Ogre::HardwareBufferManagerBase::createVertexBuffer
virtual HardwareVertexBufferSharedPtr createVertexBuffer(size_t vertexSize, size_t numVerts, HardwareBuffer::Usage usage, bool useShadowBuffer=false)=0
Create a hardware vertex buffer.
Ogre::HardwareBufferManager::destroyVertexBufferBinding
virtual void destroyVertexBufferBinding(VertexBufferBinding *binding)
Destroys a VertexBufferBinding.
Definition: OgreHardwareBufferManager.h:491
Ogre::HardwareBufferManagerBase::_notifyIndexBufferDestroyed
void _notifyIndexBufferDestroyed(HardwareIndexBuffer *buf)
Notification that a hardware index buffer has been destroyed.
Ogre::HardwareBufferManagerBase::VertexBufferLicense::VertexBufferLicense
VertexBufferLicense(HardwareVertexBuffer *orig, BufferLicenseType ltype, size_t delay, HardwareVertexBufferSharedPtr buf, HardwareBufferLicensee *lic)
Definition: OgreHardwareBufferManager.h:181
Ogre::HardwareBufferManagerBase::registerVertexBufferSourceAndCopy
virtual void registerVertexBufferSourceAndCopy(const HardwareVertexBufferSharedPtr &sourceBuffer, const HardwareVertexBufferSharedPtr &copy)
Registers a vertex buffer as a copy of another.
Ogre::HardwareBufferManagerBase::_forceReleaseBufferCopies
virtual void _forceReleaseBufferCopies(const HardwareVertexBufferSharedPtr &sourceBuffer)
Internal method that forces the release of copies of a given buffer.
Ogre::TempBlendedBufferInfo::posNormalShareBuffer
bool posNormalShareBuffer
Both positions and normals are contained in the same buffer.
Definition: OgreHardwareBufferManager.h:81
Ogre::HardwareBufferManagerBase::mVertexDeclarations
VertexDeclarationList mVertexDeclarations
Definition: OgreHardwareBufferManager.h:135
Ogre::HardwareUniformBufferSharedPtr
Shared pointer implementation used to share uniform buffers.
Definition: OgreHardwareUniformBuffer.h:68
Ogre::HardwareBufferManagerBase::destroyVertexBufferBinding
virtual void destroyVertexBufferBinding(VertexBufferBinding *binding)
Destroys a VertexBufferBinding.
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58
Ogre::multimap
Definition: OgrePrerequisites.h:547
Ogre::HardwareBufferManagerBase::createRenderToVertexBuffer
virtual RenderToVertexBufferSharedPtr createRenderToVertexBuffer()=0
Create a render to vertex buffer.
Ogre::HardwareBufferManagerBase::VertexBufferLicense::buffer
HardwareVertexBufferSharedPtr buffer
Definition: OgreHardwareBufferManager.h:179

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.