#include <OgreGLHardwareBufferManager.h>
Inheritance diagram for Ogre::GLHardwareBufferManager:
Public Types | |
enum | BufferLicenseType { BLT_MANUAL_RELEASE, BLT_AUTOMATIC_RELEASE } |
Public Member Functions | |
GLHardwareBufferManager () | |
~GLHardwareBufferManager () | |
HardwareVertexBufferSharedPtr | createVertexBuffer (size_t vertexSize, size_t numVerts, HardwareBuffer::Usage usage, bool useShadowBuffer=false) |
Creates a vertex buffer. | |
HardwareIndexBufferSharedPtr | createIndexBuffer (HardwareIndexBuffer::IndexType itype, size_t numIndexes, HardwareBuffer::Usage usage, bool useShadowBuffer=false) |
Create a hardware vertex buffer. | |
virtual VertexDeclaration * | createVertexDeclaration (void) |
Creates a new vertex declaration. | |
virtual void | destroyVertexDeclaration (VertexDeclaration *decl) |
Destroys a vertex declaration. | |
virtual VertexBufferBinding * | createVertexBufferBinding (void) |
Creates a new VertexBufferBinding. | |
virtual void | destroyVertexBufferBinding (VertexBufferBinding *binding) |
Destroys a VertexBufferBinding. | |
virtual void | registerVertexBufferSourceAndCopy (const HardwareVertexBufferSharedPtr &sourceBuffer, const HardwareVertexBufferSharedPtr ©) |
Registers a vertex buffer as a copy of another. | |
virtual HardwareVertexBufferSharedPtr | allocateVertexBufferCopy (const HardwareVertexBufferSharedPtr &sourceBuffer, BufferLicenseType licenseType, HardwareBufferLicensee *licensee, bool copyData=false) |
Allocates a copy of a given vertex buffer. | |
virtual void | releaseVertexBufferCopy (const HardwareVertexBufferSharedPtr &bufferCopy) |
Manually release a vertex buffer copy for others to subsequently use. | |
virtual void | touchVertexBufferCopy (const HardwareVertexBufferSharedPtr &bufferCopy) |
Tell engine that the vertex buffer copy intent to reuse. | |
virtual void | _freeUnusedBufferCopies (void) |
Free all unused vertex buffer copies. | |
virtual void | _releaseBufferCopies (bool forceFreeUnused=false) |
Internal method for releasing all temporary buffers which have been allocated using BLT_AUTOMATIC_RELEASE; is called by OGRE. | |
virtual void | _forceReleaseBufferCopies (const HardwareVertexBufferSharedPtr &sourceBuffer) |
Internal method that forces the release of copies of a given buffer. | |
virtual void | _forceReleaseBufferCopies (HardwareVertexBuffer *sourceBuffer) |
Internal method that forces the release of copies of a given buffer. | |
void | _notifyVertexBufferDestroyed (HardwareVertexBuffer *buf) |
Notification that a hardware vertex buffer has been destroyed. | |
void | _notifyIndexBufferDestroyed (HardwareIndexBuffer *buf) |
Notification that a hardware index buffer has been destroyed. | |
Static Public Member Functions | |
GLenum | getGLUsage (unsigned int usage) |
Utility function to get the correct GL usage based on HBU's. | |
GLenum | getGLType (unsigned int type) |
Utility function to get the correct GL type based on VET's. | |
HardwareBufferManager & | getSingleton (void) |
Override standard Singleton retrieval. | |
HardwareBufferManager * | getSingletonPtr (void) |
Override standard Singleton retrieval. | |
Protected Types | |
typedef std::set< HardwareVertexBuffer * > | VertexBufferList |
WARNING: The following two members should place before all other members. | |
typedef std::set< HardwareIndexBuffer * > | IndexBufferList |
typedef std::set< VertexDeclaration * > | VertexDeclarationList |
typedef std::set< VertexBufferBinding * > | VertexBufferBindingList |
typedef std::multimap< HardwareVertexBuffer *, HardwareVertexBufferSharedPtr > | FreeTemporaryVertexBufferMap |
Map from original buffer to temporary buffers. | |
typedef std::map< HardwareVertexBuffer *, VertexBufferLicense > | TemporaryVertexBufferLicenseMap |
Map from temporary buffer to details of a license. | |
Protected Member Functions | |
virtual void | destroyAllDeclarations (void) |
Internal method for destroys all vertex declarations. | |
virtual void | destroyAllBindings (void) |
Internal method for destroys all vertex buffer bindings. | |
virtual VertexDeclaration * | createVertexDeclarationImpl (void) |
Internal method for creates a new vertex declaration, may be overridden by certain rendering APIs. | |
virtual void | destroyVertexDeclarationImpl (VertexDeclaration *decl) |
Internal method for destroys a vertex declaration, may be overridden by certain rendering APIs. | |
virtual VertexBufferBinding * | createVertexBufferBindingImpl (void) |
Internal method for creates a new VertexBufferBinding, may be overridden by certain rendering APIs. | |
virtual void | destroyVertexBufferBindingImpl (VertexBufferBinding *binding) |
Internal method for destroys a VertexBufferBinding, may be overridden by certain rendering APIs. | |
HardwareVertexBufferSharedPtr | makeBufferCopy (const HardwareVertexBufferSharedPtr &source, HardwareBuffer::Usage usage, bool useShadowBuffer) |
Creates a new buffer as a copy of the source, does not copy data. | |
Protected Attributes | |
VertexBufferList | mVertexBuffers |
IndexBufferList | mIndexBuffers |
VertexDeclarationList | mVertexDeclarations |
VertexBufferBindingList | mVertexBufferBindings |
FreeTemporaryVertexBufferMap | mFreeTempVertexBufferMap |
Map of current available temp buffers. | |
TemporaryVertexBufferLicenseMap | mTempVertexBufferLicenses |
Map of currently licensed temporary buffers. | |
size_t | mUnderUsedFrameCount |
Number of frames elapsed since temporary buffers utilization was above half the available. | |
Static Protected Attributes | |
const size_t | UNDER_USED_FRAME_THRESHOLD |
Number of frames to wait before free unused temporary buffers. | |
const size_t | EXPIRED_DELAY_FRAME_THRESHOLD |
Frame delay for BLT_AUTOMATIC_RELEASE temporary buffers. | |
HardwareBufferManager * | ms_Singleton |
Definition at line 34 of file OgreGLHardwareBufferManager.h.
|
Map from original buffer to temporary buffers.
Definition at line 164 of file OgreHardwareBufferManager.h. |
|
Definition at line 102 of file OgreHardwareBufferManager.h. |
|
Map from temporary buffer to details of a license.
Definition at line 168 of file OgreHardwareBufferManager.h. |
|
Definition at line 108 of file OgreHardwareBufferManager.h. |
|
WARNING: The following two members should place before all other members. Members destruct order is very important here, because destructing other members will cause notify back to this class, and then will access to this two members. Definition at line 101 of file OgreHardwareBufferManager.h. |
|
Definition at line 107 of file OgreHardwareBufferManager.h. |
|
Definition at line 130 of file OgreHardwareBufferManager.h. |
|
|
|
|
|
Internal method that forces the release of copies of a given buffer.
|
|
Internal method that forces the release of copies of a given buffer.
|
|
Free all unused vertex buffer copies.
|
|
Notification that a hardware index buffer has been destroyed.
|
|
Notification that a hardware vertex buffer has been destroyed.
|
|
Internal method for releasing all temporary buffers which have been allocated using BLT_AUTOMATIC_RELEASE; is called by OGRE.
|
|
Allocates a copy of a given vertex buffer.
|
|
Create a hardware vertex buffer.
Implements Ogre::HardwareBufferManager. |
|
Creates a vertex buffer.
Implements Ogre::HardwareBufferManager. |
|
Creates a new VertexBufferBinding.
|
|
Internal method for creates a new VertexBufferBinding, may be overridden by certain rendering APIs.
|
|
Creates a new vertex declaration.
|
|
Internal method for creates a new vertex declaration, may be overridden by certain rendering APIs.
Reimplemented in Ogre::D3D9HardwareBufferManager. |
|
Internal method for destroys all vertex buffer bindings.
|
|
Internal method for destroys all vertex declarations.
|
|
Destroys a VertexBufferBinding.
|
|
Internal method for destroys a VertexBufferBinding, may be overridden by certain rendering APIs.
|
|
Destroys a vertex declaration.
|
|
Internal method for destroys a vertex declaration, may be overridden by certain rendering APIs.
Reimplemented in Ogre::D3D9HardwareBufferManager. |
|
Utility function to get the correct GL type based on VET's.
|
|
Utility function to get the correct GL usage based on HBU's.
|
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< HardwareBufferManager >. |
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< HardwareBufferManager >. |
|
Creates a new buffer as a copy of the source, does not copy data.
|
|
Registers a vertex buffer as a copy of another.
|
|
Manually release a vertex buffer copy for others to subsequently use.
|
|
Tell engine that the vertex buffer copy intent to reuse.
|
|
Frame delay for BLT_AUTOMATIC_RELEASE temporary buffers.
Definition at line 176 of file OgreHardwareBufferManager.h. |
|
Map of current available temp buffers.
Definition at line 166 of file OgreHardwareBufferManager.h. |
|
Definition at line 104 of file OgreHardwareBufferManager.h. |
|
Definition at line 54 of file OgreSingleton.h. |
|
Map of currently licensed temporary buffers.
Definition at line 170 of file OgreHardwareBufferManager.h. |
|
Number of frames elapsed since temporary buffers utilization was above half the available.
Definition at line 172 of file OgreHardwareBufferManager.h. |
|
Definition at line 110 of file OgreHardwareBufferManager.h. |
|
Definition at line 103 of file OgreHardwareBufferManager.h. |
|
Definition at line 109 of file OgreHardwareBufferManager.h. |
|
Number of frames to wait before free unused temporary buffers.
Definition at line 174 of file OgreHardwareBufferManager.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:52:36 2006