OGRE-Next: Ogre::TextureDefinitionBase::BufferDefinition Struct Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::TextureDefinitionBase::BufferDefinition Struct Reference

`#include <OgreTextureDefinition.h>`

Inheritance diagram for Ogre::TextureDefinitionBase::BufferDefinition:
[legend]

## 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.
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).

## Constructor & Destructor Documentation

## ◆ BufferDefinition()

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

References bindFlags, bytesPerElement, heightFactor, name, numElements, and widthFactor.

## Member Function Documentation

## ◆ _setName()

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

Do not call directly.

See also
  TextureDefinition::renameBuffer instead.

References name.

## ◆ getName()

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

References name.

## Member Data Documentation

## ◆ bindFlags

uint32 Ogre::TextureDefinitionBase::BufferDefinition::bindFlags

Referenced by BufferDefinition().

## ◆ bytesPerElement

uint32 Ogre::TextureDefinitionBase::BufferDefinition::bytesPerElement

Referenced by BufferDefinition().

## ◆ heightFactor

float Ogre::TextureDefinitionBase::BufferDefinition::heightFactor

Referenced by BufferDefinition().

## ◆ name

IdString Ogre::TextureDefinitionBase::BufferDefinition::name

Referenced by BufferDefinition(), _setName(), and getName().

## ◆ numElements

size_t Ogre::TextureDefinitionBase::BufferDefinition::numElements

Referenced by BufferDefinition().

## ◆ 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)

Referenced by BufferDefinition().

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

- OgreTextureDefinition.h