Overte C++ Documentation
gpu::Element Class Reference

#include <Format.h>

Collaboration diagram for gpu::Element:

Public Member Functions

Semantic getSemantic () const
 
Dimension getDimension () const
 
bool isCompressed () const
 
Type getType () const
 
bool isNormalized () const
 
bool isInteger () const
 
uint8 getScalarCount () const
 
uint32 getSize () const
 
const glm::ivec2 & getTile () const
 
uint8 getLocationCount () const
 
uint8 getLocationScalarCount () const
 
uint32 getLocationSize () const
 

Detailed Description

Element is a simple 16bit value that contains everything we need to know about an element of a buffer, a pixel of a texture, a varying input/output or uniform from a shader pipeline. Type and dimension of the element, and semantic

Member Function Documentation

◆ getDimension()

Dimension gpu::Element::getDimension ( ) const
inline
Returns
Enum representing number of dimensions given element has.

◆ getLocationCount()

uint8 gpu::Element::getLocationCount ( ) const
inline
Returns
Number of locations in the element. Location can contain one or more scalars.

◆ getLocationScalarCount()

uint8 gpu::Element::getLocationScalarCount ( ) const
inline
Returns
Number of scalars per location in the element.

◆ getLocationSize()

uint32 gpu::Element::getLocationSize ( ) const
inline
Returns
Size in bytes of a location. Element can contain one or more locations.

◆ getScalarCount()

uint8 gpu::Element::getScalarCount ( ) const
inline
Returns
Number of scalar values in a single element.

◆ getSemantic()

Semantic gpu::Element::getSemantic ( ) const
inline
Returns
Semantic of this element, which represents its usage.

◆ getSize()

uint32 gpu::Element::getSize ( ) const
inline
Returns
Size of a single element in bytes.

◆ getTile()

const glm::ivec2& gpu::Element::getTile ( ) const
inline

For 3x3 and 4x4 matrices it also returns (1, 1).

Returns
returns (1,1), except for tiled elements, for which it returns number of scalars in each direction.

◆ getType()

Type gpu::Element::getType ( ) const
inline
Returns
Element type, for example Type::INT32.

◆ isCompressed()

bool gpu::Element::isCompressed ( ) const
inline
Returns
true if it's a compressed texture format.

◆ isInteger()

bool gpu::Element::isInteger ( ) const
inline
Returns
true for integer types. false for other types, including normalized integers.

◆ isNormalized()

bool gpu::Element::isNormalized ( ) const
inline

For normalized types full range of the integer value is mapped to 0...1 floating point for unsigned integers and -1...1 for signed integer types.

Returns
true for normalized integer types.

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