OGRE: Ogre::D3D11CompatBufferInterface Class Reference

| OGRE 2.2.4 Object-Oriented Graphics Rendering Engine

Public Member Functions | List of all members
Ogre::D3D11CompatBufferInterface Class Reference

In D3D11, const buffers can't be bound by offset. More...

`#include <OgreD3D11CompatBufferInterface.h>`

Inheritance diagram for Ogre::D3D11CompatBufferInterface:
[legend]

## Public Member Functions
| D3D11CompatBufferInterface (size_t vboPoolIdx, ID3D11Buffer *d3dBuffer, D3D11Device &device)
| ~D3D11CompatBufferInterface ()
void | _ensureDelayedImmutableBuffersAreReady (void)
virtual void | _notifyBuffer (BufferPacked *buffer)
virtual void | advanceFrame (void)
virtual void | copyTo (BufferInterface *dstBuffer, size_t dstOffsetBytes, size_t srcOffsetBytes, size_t sizeBytes)
BufferPacked * | getBufferPacked (void)
ID3D11Buffer * | getVboName (void) const
size_t | getVboPoolIndex (void)
virtual void *RESTRICT_ALIAS_RETURN | map (size_t elementStart, size_t elementCount, MappingState prevMappingState, bool advanceFrame=true)
virtual void | regressFrame (void)
virtual void | unmap (UnmapOptions unmapOption, size_t flushStartElem=0, size_t flushSizeElem=0)
void | upload (const void *data, size_t elementStart, size_t elementCount)

## Detailed Description

In D3D11, const buffers can't be bound by offset.

Their size at creation defines the size to be bound to the shader, and the max limit is 64kb. This is unless we're using D3D11.1 on Windows 8.1; which for simplicity we treat it the same as D3D11.

  This limitation prevents us from allocating 3x size for triple buffering.

  Therefore we need the traditional scheme of mapping with NO_OVERWRITE and then use DISCARD when we've filled the buffer.

  In D3D11.0, only index and vertex buffers can be mapped with NO_OVERWRITE. That leaves only DISCARD to be used on those systems. NO_OVERWRITE is used if used D3D 11.1 though.

  This buffer interface is for compatibility with these systems.

## Constructor & Destructor Documentation

## ◆ D3D11CompatBufferInterface()

Ogre::D3D11CompatBufferInterface::D3D11CompatBufferInterface | ( | size_t | vboPoolIdx,
|  | ID3D11Buffer * | d3dBuffer,
|  | D3D11Device & | device
| ) |  |

## ◆ ~D3D11CompatBufferInterface()

Ogre::D3D11CompatBufferInterface::~D3D11CompatBufferInterface | ( |  | ) |

## Member Function Documentation

## ◆ _ensureDelayedImmutableBuffersAreReady()

void Ogre::D3D11BufferInterfaceBase::_ensureDelayedImmutableBuffersAreReady | ( | void |  | ) |
| virtualinherited

Reimplemented from Ogre::BufferInterface.

## ◆ _notifyBuffer()

virtual void Ogre::BufferInterface::_notifyBuffer | ( | BufferPacked * | buffer | ) |
| inlinevirtualinherited

Reimplemented in Ogre::NULLBufferInterface.

## ◆ advanceFrame()

virtual void Ogre::D3D11CompatBufferInterface::advanceFrame | ( | void |  | ) |
| virtual

Implements Ogre::BufferInterface.

## ◆ copyTo()

virtual void Ogre::D3D11BufferInterfaceBase::copyTo | ( | BufferInterface * | dstBuffer,
|  | size_t | dstOffsetBytes,
|  | size_t | srcOffsetBytes,
|  | size_t | sizeBytes
| ) |  |
| virtualinherited

Implements Ogre::BufferInterface.

## ◆ getBufferPacked()

BufferPacked* Ogre::BufferInterface::getBufferPacked | ( | void |  | ) |
| inlineinherited

## ◆ getVboName()

ID3D11Buffer* Ogre::D3D11BufferInterfaceBase::getVboName | ( | void |  | ) | const
| inlineinherited

References Ogre::ComPtr< T >::Get().

## ◆ getVboPoolIndex()

size_t Ogre::D3D11BufferInterfaceBase::getVboPoolIndex | ( | void |  | ) |
| inlineinherited

## ◆ map()

virtual void* RESTRICT_ALIAS_RETURN Ogre::D3D11CompatBufferInterface::map | ( | size_t | elementStart,
|  | size_t | elementCount,
|  | MappingState | prevMappingState,
|  | bool | advanceFrame = `true`
| ) |  |
| virtual

Implements Ogre::BufferInterface.

## ◆ regressFrame()

virtual void Ogre::D3D11CompatBufferInterface::regressFrame | ( | void |  | ) |
| virtual

Implements Ogre::BufferInterface.

## ◆ unmap()

virtual void Ogre::D3D11CompatBufferInterface::unmap | ( | UnmapOptions | unmapOption,
|  | size_t | flushStartElem = `0`,
|  | size_t | flushSizeElem = `0`
| ) |  |
| virtual

Implements Ogre::BufferInterface.

## ◆ upload()

void Ogre::BufferInterface::upload | ( | const void * | data,
|  | size_t | elementStart,
|  | size_t | elementCount
| ) |  |
| inherited

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

- OgreD3D11CompatBufferInterface.h