OGRE-Next: Ogre::v1::GL3PlusHardwareBufferManagerBase Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Ogre::v1::GL3PlusHardwareBufferManagerBase Class Referencefinal

Implementation of HardwareBufferManager for OpenGL. More...

`#include <OgreGL3PlusHardwareBufferManager.h>`

Inheritance diagram for Ogre::v1::GL3PlusHardwareBufferManagerBase:
[legend]

## Public Member Functions
| GL3PlusHardwareBufferManagerBase ()
| ~GL3PlusHardwareBufferManagerBase () override
void * | allocateScratch (uint32 size)
| Allocator method to allow us to use a pool of memory as a scratch area for hardware buffers.
HardwareIndexBufferSharedPtr | createIndexBuffer (HardwareIndexBuffer::IndexType itype, size_t numIndexes, HardwareBuffer::Usage usage, bool useShadowBuffer=false) override
| Create a hardware vertex buffer.
HardwareVertexBufferSharedPtr | createVertexBuffer (size_t vertexSize, size_t numVerts, HardwareBuffer::Usage usage, bool useShadowBuffer=false) override
| Creates a vertex buffer.
void | deallocateScratch (void *ptr)
size_t | getGLMapBufferThreshold () const
| Threshold after which glMapBuffer is used and not glBufferSubData.
void | setGLMapBufferThreshold (const size_t value)
Public Member Functions inherited from Ogre::v1::HardwareBufferManagerBase
| HardwareBufferManagerBase ()
virtual | ~HardwareBufferManagerBase ()
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.
virtual void | _freeUnusedBufferCopies ()
| Free all unused vertex buffer copies.
void | _notifyIndexBufferDestroyed (HardwareIndexBuffer *buf)
| Notification that a hardware index buffer has been destroyed.
void | _notifyVertexBufferDestroyed (HardwareVertexBuffer *buf)
| Notification that a hardware vertex buffer has been destroyed.
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 HardwareVertexBufferSharedPtr | allocateVertexBufferCopy (const HardwareVertexBufferSharedPtr &sourceBuffer, BufferLicenseType licenseType, HardwareBufferLicensee *licensee, bool copyData=false)
| Allocates a copy of a given vertex buffer.
virtual VertexBufferBinding * | createVertexBufferBinding ()
| Creates a new VertexBufferBinding.
virtual VertexDeclaration * | createVertexDeclaration ()
| Creates a new vertex declaration.
virtual void | destroyVertexBufferBinding (VertexBufferBinding *binding)
| Destroys a VertexBufferBinding.
virtual void | destroyVertexDeclaration (VertexDeclaration *decl)
| Destroys a vertex declaration.
virtual void | registerVertexBufferSourceAndCopy (const HardwareVertexBufferSharedPtr &sourceBuffer, const HardwareVertexBufferSharedPtr &copy)
| Registers a vertex buffer as a copy of another.
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.

## Static Public Member Functions
static GLenum | getGLType (unsigned int type)
| Utility function to get the correct GL type based on VET's.
static GLenum | getGLUsage (unsigned int usage)
| Utility function to get the correct GL usage based on HBU's.

## Additional Inherited Members
Public Types inherited from Ogre::v1::HardwareBufferManagerBase
enum | BufferLicenseType { BLT_MANUAL_RELEASE , BLT_AUTOMATIC_RELEASE }

## Detailed Description

Implementation of HardwareBufferManager for OpenGL.

## Constructor & Destructor Documentation

## ◆ GL3PlusHardwareBufferManagerBase()

Ogre::v1::GL3PlusHardwareBufferManagerBase::GL3PlusHardwareBufferManagerBase | ( |  | ) |

## ◆ ~GL3PlusHardwareBufferManagerBase()

Ogre::v1::GL3PlusHardwareBufferManagerBase::~GL3PlusHardwareBufferManagerBase | ( |  | ) |
| override

## Member Function Documentation

## ◆ allocateScratch()

void * Ogre::v1::GL3PlusHardwareBufferManagerBase::allocateScratch | ( | uint32 | size | ) |

Allocator method to allow us to use a pool of memory as a scratch area for hardware buffers.

This is because glMapBuffer is incredibly inefficient, seemingly no matter what options we give it. So for the period of lock/unlock, we will instead allocate a section of a local memory pool, and use glBufferSubDataARB / glGetBufferSubDataARB instead.

## ◆ createIndexBuffer()

HardwareIndexBufferSharedPtr Ogre::v1::GL3PlusHardwareBufferManagerBase::createIndexBuffer | ( | HardwareIndexBuffer::IndexType | itype,
|  | size_t | numIndexes,
|  | HardwareBuffer::Usage | usage,
|  | bool | useShadowBuffer = false )
| overridevirtual

Create a hardware vertex buffer.

Implements Ogre::v1::HardwareBufferManagerBase.

References Ogre::v1::HardwareBufferManagerBase::HardwareIndexBufferSharedPtr.

## ◆ createVertexBuffer()

HardwareVertexBufferSharedPtr Ogre::v1::GL3PlusHardwareBufferManagerBase::createVertexBuffer | ( | size_t | vertexSize,
|  | size_t | numVerts,
|  | HardwareBuffer::Usage | usage,
|  | bool | useShadowBuffer = false )
| overridevirtual

Creates a vertex buffer.

Implements Ogre::v1::HardwareBufferManagerBase.

References Ogre::v1::HardwareBufferManagerBase::HardwareVertexBufferSharedPtr.

## ◆ deallocateScratch()

void Ogre::v1::GL3PlusHardwareBufferManagerBase::deallocateScratch | ( | void * | ptr | ) |

See also
  allocateScratch

## ◆ getGLMapBufferThreshold()

size_t Ogre::v1::GL3PlusHardwareBufferManagerBase::getGLMapBufferThreshold | ( |  | ) | const

Threshold after which glMapBuffer is used and not glBufferSubData.

## ◆ getGLType()

static GLenum Ogre::v1::GL3PlusHardwareBufferManagerBase::getGLType | ( | unsigned int | type | ) |
| static

Utility function to get the correct GL type based on VET's.

Referenced by Ogre::v1::GL3PlusHardwareBufferManager::getGLType().

## ◆ getGLUsage()

static GLenum Ogre::v1::GL3PlusHardwareBufferManagerBase::getGLUsage | ( | unsigned int | usage | ) |
| static

Utility function to get the correct GL usage based on HBU's.

Referenced by Ogre::v1::GL3PlusHardwareBufferManager::getGLUsage().

## ◆ setGLMapBufferThreshold()

void Ogre::v1::GL3PlusHardwareBufferManagerBase::setGLMapBufferThreshold | ( | const size_t | value | ) |

The documentation for this class was generated from the following file:

- OgreGL3PlusHardwareBufferManager.h