OGRE-Next
3.0.0
Object-Oriented Graphics Rendering Engine
|
Represents Texture buffers (also known as tbuffers in D3D11) More...
#include <OgreTexBufferPacked.h>
Public Member Functions | |
TexBufferPacked (size_t internalBufferStartBytes, size_t numElements, uint32 bytesPerElement, uint32 numElementsPadding, BufferType bufferType, void *initialData, bool keepAsShadow, VaoManager *vaoManager, BufferInterface *bufferInterface, PixelFormatGpu pf) | |
virtual void | _bindBufferDirectly (uint16 slot, size_t offset, size_t sizeBytes) |
To be overriden only by GL3+. More... | |
virtual void | bindBufferCS (uint16 slot, size_t offset=0, size_t sizeBytes=0)=0 |
virtual void | bindBufferDS (uint16 slot, size_t offset=0, size_t sizeBytes=0)=0 |
virtual void | bindBufferGS (uint16 slot, size_t offset=0, size_t sizeBytes=0)=0 |
virtual void | bindBufferHS (uint16 slot, size_t offset=0, size_t sizeBytes=0)=0 |
virtual void | bindBufferPS (uint16 slot, size_t offset=0, size_t sizeBytes=0)=0 |
virtual void | bindBufferVS (uint16 slot, size_t offset=0, size_t sizeBytes=0)=0 |
Binds the texture buffer to the given slot in the Vertex/Pixel/Geometry/Hull/Domain/Compute Shader. More... | |
BufferPackedTypes | getBufferPackedType () const override |
Useful to query which one is the derived class. More... | |
PixelFormatGpu | getPixelFormat () const |
Public Member Functions inherited from Ogre::BufferPacked | |
BufferPacked (size_t internalBufferStartBytes, size_t numElements, uint32 bytesPerElement, uint32 numElementsPadding, BufferType bufferType, void *initialData, bool keepAsShadow, VaoManager *vaoManager, BufferInterface *bufferInterface) | |
Generic constructor. More... | |
virtual | ~BufferPacked () |
size_t | _getFinalBufferStart () const |
size_t | _getInternalBufferStart () const |
size_t | _getInternalNumElements () const |
size_t | _getInternalTotalSizeBytes () const |
void | _setBufferInterface (BufferInterface *bufferInterface) |
For internal use. More... | |
void | _setShadowCopy (void *copy) |
This will not delete the existing shadow copy so it can be used for other purposes if it is not needed call OGRE_FREE_SIMD( m->getShadowCopy(), MEMCATEGORY_GEOMETRY ) before calling this function. More... | |
void | advanceFrame () |
void | copyTo (BufferPacked *dstBuffer, size_t dstElemStart=0, size_t srcElemStart=0, size_t srcNumElems=std::numeric_limits< size_t >::max()) |
Copies the contents of this buffer to another, using GPU -> GPU transfers. More... | |
BufferInterface * | getBufferInterface () const |
BufferType | getBufferType () const |
uint32 | getBytesPerElement () const |
MappingState | getMappingState () const |
Returns the mapping state. More... | |
size_t | getNumElements () const |
virtual BufferPacked * | getOriginalBufferType () |
If this buffer has been reinterpreted from an UavBufferPacked, returns the original version, otherwise returns 'this'. More... | |
const void * | getShadowCopy () const |
size_t | getTotalSizeBytes () const |
bool | isCurrentlyMapped () const |
Returns whether the buffer is currently mapped. More... | |
void *RESTRICT_ALIAS_RETURN | map (size_t elementStart, size_t elementCount, bool bAdvanceFrame=true) |
Maps the specified region to a pointer the CPU can access. More... | |
AsyncTicketPtr | readRequest (size_t elementStart, size_t elementCount) |
Async data read request. More... | |
void | regressFrame () |
Performs the opposite of. More... | |
void | unmap (UnmapOptions unmapOption, size_t flushStartElem=0, size_t flushSizeElem=0) |
Unmaps or flushes the region mapped with. More... | |
virtual void | upload (const void *data, size_t elementStart, size_t elementCount) |
Sends the provided data to the GPU. More... | |
Public Member Functions inherited from Ogre::GpuTrackedResource | |
virtual | ~GpuTrackedResource () |
virtual bool | isTextureGpu () const |
Represents Texture buffers (also known as tbuffers in D3D11)
|
inline |
|
inlinevirtual |
To be overriden only by GL3+.
Does the same as bindBufferXX but assumes the current GL_TEXTURE slot is already set.
Reimplemented in Ogre::GL3PlusTexBufferPacked, Ogre::GL3PlusTexBufferEmulatedPacked, Ogre::GL3PlusReadOnlyBufferEmulatedPacked, Ogre::GL3PlusReadOnlyUavBufferPacked, and Ogre::GL3PlusReadOnlyTexBufferPacked.
References OGRE_UNUSED_VAR.
|
pure virtual |
Implemented in Ogre::VulkanTexBufferPacked, Ogre::VulkanReadOnlyBufferPacked, Ogre::NULLReadOnlyBufferPacked, Ogre::NULLTexBufferPacked, Ogre::MetalTexBufferPacked, Ogre::GL3PlusTexBufferPacked, Ogre::GL3PlusTexBufferEmulatedPacked, Ogre::GL3PlusReadOnlyBufferEmulatedPacked, Ogre::GL3PlusReadOnlyUavBufferPacked, Ogre::GL3PlusReadOnlyTexBufferPacked, Ogre::D3D11TexBufferPacked, Ogre::D3D11ReadOnlyBufferPacked, and Ogre::GLES2TexBufferEmulatedPacked.
|
pure virtual |
Implemented in Ogre::VulkanTexBufferPacked, Ogre::VulkanReadOnlyBufferPacked, Ogre::NULLReadOnlyBufferPacked, Ogre::NULLTexBufferPacked, Ogre::MetalTexBufferPacked, Ogre::GL3PlusTexBufferPacked, Ogre::GL3PlusTexBufferEmulatedPacked, Ogre::GL3PlusReadOnlyBufferEmulatedPacked, Ogre::GL3PlusReadOnlyUavBufferPacked, Ogre::GL3PlusReadOnlyTexBufferPacked, Ogre::D3D11TexBufferPacked, Ogre::D3D11ReadOnlyBufferPacked, and Ogre::GLES2TexBufferEmulatedPacked.
|
pure virtual |
Implemented in Ogre::VulkanTexBufferPacked, Ogre::VulkanReadOnlyBufferPacked, Ogre::NULLReadOnlyBufferPacked, Ogre::NULLTexBufferPacked, Ogre::MetalTexBufferPacked, Ogre::GL3PlusTexBufferPacked, Ogre::GL3PlusTexBufferEmulatedPacked, Ogre::GL3PlusReadOnlyBufferEmulatedPacked, Ogre::GL3PlusReadOnlyUavBufferPacked, Ogre::GL3PlusReadOnlyTexBufferPacked, Ogre::D3D11TexBufferPacked, Ogre::D3D11ReadOnlyBufferPacked, and Ogre::GLES2TexBufferEmulatedPacked.
|
pure virtual |
Implemented in Ogre::VulkanTexBufferPacked, Ogre::VulkanReadOnlyBufferPacked, Ogre::NULLReadOnlyBufferPacked, Ogre::NULLTexBufferPacked, Ogre::MetalTexBufferPacked, Ogre::GL3PlusTexBufferPacked, Ogre::GL3PlusTexBufferEmulatedPacked, Ogre::GL3PlusReadOnlyBufferEmulatedPacked, Ogre::GL3PlusReadOnlyUavBufferPacked, Ogre::GL3PlusReadOnlyTexBufferPacked, Ogre::D3D11TexBufferPacked, Ogre::D3D11ReadOnlyBufferPacked, and Ogre::GLES2TexBufferEmulatedPacked.
|
pure virtual |
Implemented in Ogre::VulkanTexBufferPacked, Ogre::VulkanReadOnlyBufferPacked, Ogre::NULLReadOnlyBufferPacked, Ogre::NULLTexBufferPacked, Ogre::MetalTexBufferPacked, Ogre::GL3PlusTexBufferPacked, Ogre::GL3PlusTexBufferEmulatedPacked, Ogre::GL3PlusReadOnlyBufferEmulatedPacked, Ogre::GL3PlusReadOnlyUavBufferPacked, Ogre::GL3PlusReadOnlyTexBufferPacked, Ogre::D3D11TexBufferPacked, Ogre::D3D11ReadOnlyBufferPacked, and Ogre::GLES2TexBufferEmulatedPacked.
|
pure virtual |
Binds the texture buffer to the given slot in the Vertex/Pixel/Geometry/Hull/Domain/Compute Shader.
slot | The slot to asign this constant buffer. In D3D11 it's called 'slot'. In GLSL it's called it's called 'binding' |
offset | 0-based offset. It is possible to bind a region of the buffer. Offset needs to be aligned. You can query the RS capabilities for the alignment, however 256 bytes is the maximum allowed alignment per the OpenGL specification, making it a safe bet to hardcode. |
sizeBytes | Size in bytes to bind the tex buffer. When zero, binds from offset until the end of the buffer. |
Implemented in Ogre::VulkanTexBufferPacked, Ogre::VulkanReadOnlyBufferPacked, Ogre::NULLReadOnlyBufferPacked, Ogre::NULLTexBufferPacked, Ogre::MetalTexBufferPacked, Ogre::GL3PlusTexBufferPacked, Ogre::GL3PlusTexBufferEmulatedPacked, Ogre::GL3PlusReadOnlyBufferEmulatedPacked, Ogre::GL3PlusReadOnlyUavBufferPacked, Ogre::GL3PlusReadOnlyTexBufferPacked, Ogre::D3D11TexBufferPacked, Ogre::D3D11ReadOnlyBufferPacked, and Ogre::GLES2TexBufferEmulatedPacked.
|
inlineoverridevirtual |
Useful to query which one is the derived class.
Implements Ogre::BufferPacked.
Reimplemented in Ogre::MetalReadOnlyBufferPacked, and Ogre::MetalTexBufferPacked.
References Ogre::BP_TYPE_TEX.
|
inline |