OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::TextureDefinitionBase::BufferDefinition Struct Reference

#include <OgreTextureDefinition.h>

+ Inheritance diagram for Ogre::TextureDefinitionBase::BufferDefinition:

Public Member Functions

 BufferDefinition (IdString _name, size_t _numElements, uint32 _bytesPerElement, uint32 _bindFlags, float _widthFactor, float _heightFactor)
 
void _setName (IdString newName)
 Do not call directly. More...
 
IdString getName () const
 

Public Attributes

uint32 bindFlags
 
uint32 bytesPerElement
 
float heightFactor
 
IdString name
 
size_t numElements
 
float widthFactor
 Sometimes buffers can be used as a plain-array contiguous image (instead of the swizzled pattern from textures). More...
 

Constructor & Destructor Documentation

◆ BufferDefinition()

Ogre::TextureDefinitionBase::BufferDefinition::BufferDefinition ( IdString  _name,
size_t  _numElements,
uint32  _bytesPerElement,
uint32  _bindFlags,
float  _widthFactor,
float  _heightFactor 
)
inline

Member Function Documentation

◆ _setName()

void Ogre::TextureDefinitionBase::BufferDefinition::_setName ( IdString  newName)
inline

Do not call directly.

See also
TextureDefinition::renameBuffer instead.

◆ getName()

IdString Ogre::TextureDefinitionBase::BufferDefinition::getName ( ) const
inline

Member Data Documentation

◆ bindFlags

uint32 Ogre::TextureDefinitionBase::BufferDefinition::bindFlags

◆ bytesPerElement

uint32 Ogre::TextureDefinitionBase::BufferDefinition::bytesPerElement

◆ heightFactor

float Ogre::TextureDefinitionBase::BufferDefinition::heightFactor

◆ name

IdString Ogre::TextureDefinitionBase::BufferDefinition::name

◆ numElements

size_t Ogre::TextureDefinitionBase::BufferDefinition::numElements

◆ widthFactor

float Ogre::TextureDefinitionBase::BufferDefinition::widthFactor

Sometimes buffers can be used as a plain-array contiguous image (instead of the swizzled pattern from textures).

The formula to calculate final num elements is : finalNumElements = numElements; if( widthFactor > 0 ) finalNumElements *= (widthFactor * width); if( heightFactor > 0 ) finalNumElements *= (heightFactor * height); For example if you want to do 512 x height; just set numElements to 512 and heightFactor to 1. Since there are no pixel formats, the bytesPerElement controls such such thing (eg. 4 bytes for RGBA8888)


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