OGRE-Next: Ogre::GL3PlusStagingTexture Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::GL3PlusStagingTexture Class Referencefinal

`#include <OgreGL3PlusStagingTexture.h>`

Inheritance diagram for Ogre::GL3PlusStagingTexture:
[legend]

## Public Member Functions
| GL3PlusStagingTexture (VaoManager *vaoManager, PixelFormatGpu formatFamily, size_t size, size_t internalBufferStart, size_t vboPoolIdx, GL3PlusDynamicBuffer *dynamicBuffer)
| ~GL3PlusStagingTexture () override
GL3PlusDynamicBuffer * | _getDynamicBuffer ()
void | _resetDynamicBuffer ()
void | _unmapBuffer ()
void | startMapRegion () override
| Must be called from main thread when the StagingBuffer is grabbed.
void | stopMapRegion () override
| Must be called from main thread when the StagingBuffer is released.
void | upload (const TextureBox &srcBox, TextureGpu *dstTexture, uint8 mipLevel, const TextureBox *cpuSrcBox=0, const TextureBox *dstBox=0, bool skipSysRamCopy=false) override
| Uploads a region of data in srcBox (which must have been created with mapRegion) into dstTexture.
Public Member Functions inherited from Ogre::StagingTextureBufferImpl
| StagingTextureBufferImpl (VaoManager *vaoManager, PixelFormatGpu formatFamily, size_t size, size_t internalBufferStart, size_t vboPoolIdx)
| ~StagingTextureBufferImpl () override
size_t | _getInternalBufferStart () const
size_t | _getInternalTotalSizeBytes () const
size_t | _getSizeBytes () override
| Returns size in bytes.
size_t | getVboPoolIndex ()
bool | isSmallerThan (const StagingTexture *other) const override
void | startMapRegion () override
| Must be called from main thread when the StagingBuffer is grabbed.
bool | supportsFormat (uint32 width, uint32 height, uint32 depth, uint32 slices, PixelFormatGpu pixelFormat) const override
| D3D11 has restrictions about which StagingTextures can be uploaded to which textures based on texture families (for example all PFG_RGBA32_* belong to the same family).
Public Member Functions inherited from Ogre::StagingTexture
| StagingTexture (VaoManager *vaoManager, PixelFormatGpu formatFamily)
virtual | ~StagingTexture ()
PixelFormatGpu | getFormatFamily () const
| Returns the format family it was requested.
uint32 | getLastFrameUsed () const
TextureBox | mapRegion (uint32 width, uint32 height, uint32 depth, uint32 slices, PixelFormatGpu pixelFormat)
| Can be called from worker thread, but not from multiple threads at the same time, also you can't call anything else either.
bool | uploadWillStall ()
| If it returns true, startMapRegion will stall.

## Constructor & Destructor Documentation

## ◆ GL3PlusStagingTexture()

Ogre::GL3PlusStagingTexture::GL3PlusStagingTexture | ( | VaoManager * | vaoManager,
|  | PixelFormatGpu | formatFamily,
|  | size_t | size,
|  | size_t | internalBufferStart,
|  | size_t | vboPoolIdx,
|  | GL3PlusDynamicBuffer * | dynamicBuffer )

## ◆ ~GL3PlusStagingTexture()

Ogre::GL3PlusStagingTexture::~GL3PlusStagingTexture | ( |  | ) |
| override

## Member Function Documentation

## ◆ _getDynamicBuffer()

GL3PlusDynamicBuffer * Ogre::GL3PlusStagingTexture::_getDynamicBuffer | ( |  | ) |
| inline

## ◆ _resetDynamicBuffer()

void Ogre::GL3PlusStagingTexture::_resetDynamicBuffer | ( |  | ) |
| inline

## ◆ _unmapBuffer()

void Ogre::GL3PlusStagingTexture::_unmapBuffer | ( |  | ) |

## ◆ startMapRegion()

void Ogre::GL3PlusStagingTexture::startMapRegion | ( |  | ) |
| overridevirtual

Must be called from main thread when the StagingBuffer is grabbed.

Remarks
  Calling this function if you've already called upload() may stall. Grab another StagingTexture to prevent stall. See uploadWillStall.

Reimplemented from Ogre::StagingTexture.

## ◆ stopMapRegion()

void Ogre::GL3PlusStagingTexture::stopMapRegion | ( |  | ) |
| overridevirtual

Must be called from main thread when the StagingBuffer is released.

Reimplemented from Ogre::StagingTexture.

## ◆ upload()

void Ogre::GL3PlusStagingTexture::upload | ( | const TextureBox & | srcBox,
|  | TextureGpu * | dstTexture,
|  | uint8 | mipLevel,
|  | const TextureBox * | cpuSrcBox = 0,
|  | const TextureBox * | dstBox = 0,
|  | bool | skipSysRamCopy = false )
| overridevirtual

Uploads a region of data in srcBox (which must have been created with mapRegion) into dstTexture.

Parameters

  srcBox | The source data to copy from. Must have been created from mapRegion and must not have been altered (i.e. changed its internal variables) Values inside srcBox such as x, y, z & sliceStart will be ignored.
  dstTexture | The destination texture. If dstBox is a null pointer, srcBox must match the texture dimensions exactly (x,y,z = 0; same resolution)
  cpuSrcBox | A CPU-based copy that we can copy CPU -> CPU to our System RAM copy. This parameters must be present if skipSysRamCopy is false and the dstTexture strategy is GpuPageOutStrategy::AlwaysKeepSystemRamCopy or it is in OnSystemRam state.
  mipLevel | Destination mipmap.
  dstBox | Optional. Region inside dstTexture to copy to. Must have the same dimensions as srcBox. Values inside dstBox such as bytesPerRow, bytesPerImage & data will be ignored.
  skipSysRamCopy | Whether to skip the copy to system RAM. Should only be used if the System RAM copy is already up to date, which is often the case when you're transitioning to Resident while loading at the same time. If misused, readbacks will be incorrect as data in CPU won't mirror that of the data in GPU, and possibly other bugs too.

Reimplemented from Ogre::StagingTexture.

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

- OgreGL3PlusStagingTexture.h