PVRCore Structs#

TextureLoadFuture_#

Inheritance Relationships#

Base Types#

  • public pvr::async::IFrameworkAsyncResult< TexturePtr > (IFrameworkAsyncResult)

  • public std::enable_shared_from_this< TextureLoadFuture_ >

Struct Documentation#

struct TextureLoadFuture_ : public pvr::async::IFrameworkAsyncResult<TexturePtr>, public std::enable_shared_from_this<TextureLoadFuture_>#

A class wrapping the operations necessary to retrieve an asynchronously loaded texture, (e.g. querying if the load is complete, or blocking-wait get the result. It is a shared reference counted resource.

Public Types

typedef IFrameworkAsyncResult<TexturePtr> MyBase#

Base class.

typedef MyBase::Callback CallbackType#

The type of function that can be used as a completion callback.

Public Functions

inline TextureLoadFuture_()#
inline void loadNow()#

Load the texture synchronously and signal the result semaphore. Normally called by the worker thread.

inline void setCallBack(CallbackType callback)#

Set a function to be called when the texture loading has been finished.

Parameters

callback – Set a function to be called when the texture loading has been finished.

Public Members

Semaphore *workSemaphore#

A pointer to an externally used semaphore (normally the one used by the queue)

std::string filename#

The filename from which the texture is loaded.

IAssetProvider *loader#

The AssetProvider to use to load the texture.

TextureFileFormat format#

The format of the texture.

mutable SemaphorePtr resultSemaphore#

The semaphore that is used to wait for the result

TexturePtr result#

The result of the operation will be stored here.

std::exception_ptr exception#

A pointer to an exception to throw.

AttributeSemantic#

Struct Documentation#

struct AttributeSemantic#

A Reference to an Attribute semantic.

Public Members

StringHash semantic#

The Semantic that should provide the value of this attribute.

StringHash variableName#

The variable name of the attribute in the shader.

GpuDatatypes dataType#

The datatype of the semantic.

uint8_t location#

The attribute index.

uint8_t vboBinding#

The binding index of the VBO (which VBO binding this attibute should be sourced from.

BufferDefinition#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

  • public NameComparable< BufferDefinition >

Struct Documentation#

struct BufferDefinition : public NameComparable<BufferDefinition>#

Information about a Buffer.

Public Functions

inline BufferDefinition()#

Public Members

BufferUsageFlags allSupportedBindings#

The binding types this buffer supports.

bool isDynamic#

If the buffer can be piecemally (dynamically) bound.

std::vector<Entry> entries#

Storage of the variable entries.

VariableScope scope#

Scope of the buffer.

bool multibuffering#

If this buffer requires to have one instance per frame.

struct Entry#

A variable entry into the buffer definition.

Public Members

StringHash semantic#

The semantic name of the variable.

GpuDatatypes dataType#

The datatype of the variable.

uint32_t arrayElements#

If an array, the number of elements.

BufferDefinition::Entry#

Nested Relationships#

This struct is a nested type of BufferDefinition.

Struct Documentation#

struct Entry

A variable entry into the buffer definition.

Public Members

StringHash semantic

The semantic name of the variable.

GpuDatatypes dataType

The datatype of the variable.

uint32_t arrayElements

If an array, the number of elements.

BufferRef#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct BufferRef : public pvr::effect::DescriptorRef#

A Reference to a buffer object inside the effect. Can be accessed either in its entirety through a Semantic, or through the semantics of each of its elements.

Public Members

StringHash semantic#

Optionally, the Semantic to provide the value for this entire buffer reference (otherwise you can /// use the variable semantics of its contents)

StringHash bufferName#

The name (identifier) of the buffer.

DescriptorType type#

The descriptor type of this buffer reference.

DescriptorRef#

Inheritance Relationships#

Derived Types#

Struct Documentation#

struct DescriptorRef#

Base class for classes that represent semantic references to an image or buffer.

Subclassed by pvr::effect::BufferRef, pvr::effect::InputAttachmentRef, pvr::effect::UniformSemantic

Public Functions

inline DescriptorRef()#

Public Members

int8_t set#

The descriptor set index where the object will be bound.

int8_t binding#

The index of the binding inside the descriptor set.

Effect#

Struct Documentation#

struct Effect#

An entire effect with all its metadata. An effect is intended to describe an entire, possibly multipass, rendering configuration, for several different objects - potentially an entire scene - by defining all the targets, textures, buffers, different pipelines for different objects, as long as they fulfil some similar conceptual roles (see subpass groups). By using “SEMANTICS”, i.e. descriptions of different items of information that may be provided from outside (e.g. the model, the animation system, or other), it provides a clear interface for the application to provide this information and render automatically. For an implementation of a rendering system using that, see the RenderManager in Vulkan Utilities.

Public Types

using EffectHandle = std::shared_ptr<Effect>#
using EffectReader = void (*)(const ::pvr::Stream &stream, Effect &thisEffect)#

Public Functions

inline void loadWithReader(EffectReader reader, const ::pvr::Stream &stream)#

Load the data of this asset from an AssetReader. This function requires an already constructed object, so it is commonly used to reuse an asset.

Parameters
  • reader – An AssetReader instance. Can be empty (without a stream).

  • stream – A stream that contains the data to load into this asset.

inline const std::vector<StringHash> &getVersions() const#

Get all api versions defined for this effect.

Returns

A vector with all supported version strings

inline void addVersion(const StringHash &apiName)#

Add an additional supported version.

Parameters

apiName – A string denoting a supported version.

inline void addShader(const StringHash &apiName, Shader &&shader)#

Add a shader for a specific api version.

Parameters
  • apiName – A string denoting a supported version.

  • shader – A Shader object containing the Source and type of the shader.

inline void addShader(const StringHash &apiName, const Shader &shader)#

Add a shader for a specific api version.

Parameters
  • apiName – A string denoting a supported version.

  • shader – A Shader object containing the Source and type of the shader.

inline void addTexture(TextureDefinition &&texture)#

Add a texture to this effect object.

Parameters

texture – A TextureDefinition object to add to this effect.

inline void addTexture(const TextureDefinition &texture)#

Add a texture to this effect object.

Parameters

texture – A TextureDefinition object to add to this effect.

inline void addBuffer(BufferDefinition &&buffer)#

Add a buffer to this effect object.

Parameters

buffer – A BufferDefinition object to add to this effect.

inline void addBuffer(const BufferDefinition &buffer)#

Add a buffer to this effect object.

Parameters

buffer – A BufferDefinition object to add to this effect.

inline void addPipeline(const StringHash &apiName, PipelineDefinition &&pipeline)#

Add a pipeline to this effect object for a specific api version.

Parameters
  • apiName – A string for the specific API version for which this pipeline will be defined.

  • pipeline – A Pipeline object to add to this effect.

inline void addPipeline(const StringHash &apiName, const PipelineDefinition &pipeline)#

Add a pipeline to this effect object for a specific api version.

Parameters
  • apiName – A string for the specific API version for which this pipeline will be defined.

  • pipeline – A Pipeline object to add to this effect.

inline void clear()#

Empty this effect object.

Public Members

StringHash name#

The name of this effect.

std::map<StringHash, std::string> headerAttributes#

Free name value pairs provided in the header of the effect.

std::map<StringHash, std::map<StringHash, Shader>> versionedShaders#

Lists of shaders along with their corresponding apis.

std::map<StringHash, std::map<StringHash, PipelineDefinition>> versionedPipelines#

Lists of pipelines, along with their corresponding apis that they apply to.

std::map<StringHash, TextureDefinition> textures#

All the (possible) textures defined for this effect.

std::map<StringHash, BufferDefinition> buffers#

All the (possible) buffers defined for this effect.

std::vector<Pass> passes#

All the passes for this effect.

mutable std::vector<StringHash> versions#

All api versions that are defined for this effect.

Public Static Functions

static inline EffectHandle createWithReader(EffectReader reader, const ::pvr::Stream &stream)#
Parameters

reader – An AssetReader of the correct type. Must have a valid Stream opened.

Returns

A handle to the new Asset. Will be null if failed to load.

InputAttachmentRef#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct InputAttachmentRef : public pvr::effect::DescriptorRef#

A Reference to an Input Attachment.

Public Functions

inline InputAttachmentRef()#

Public Members

int8_t targetIndex#

The input attachment target index.

Pass#

Struct Documentation#

struct Pass#

One full collection of drawing into a specific render target, from start to finish. Comprised of one or more subpasses.

Public Members

StringHash name#

The name of this pass.

StringHash targetDepthStencil#

The texture to use as the Depth/Stencil buffer for this subpass.

std::vector<Subpass> subpasses#

The subpasses comprising this pass.

PipelineCondition#

Struct Documentation#

struct PipelineCondition#

A Condition that can be used to select a specific pipeline to render a specific object.

Public Types

enum ConditionType#

The type of the condition.

Values:

enumerator Always#

The pipeline is always selected.

enumerator UniformRequired#

The pipeline requires a specific Uniform Semantic to be provided by the mesh (e.g. must have “NORMALMAP” texture)

enumerator AttributeRequired#

The pipeline requires a specific Attribute Semantic to be provided by the mesh (e.g. must have “BONEWEIGHT” attribute)

enumerator UniformRequiredNo#

The pipeline requires that a specific Uniform semantic is NOT present (e.g. must not have “GLOSSINESS” texture)

enumerator AttributeRequiredNo#

The pipeline requires that a specific Attribute semantic is NOT present (e.g. must not have “BITANGENT” attribute)

enumerator AdditionalExport#

Forces a semantic to be set to a value.

Public Members

enum pvr::effect::PipelineCondition::ConditionType type#

The type of the condition.

StringHash value#

The actual value of the condition (for example the value “BONEWEIGHT” of AttributeRequired condition.

PipelineDefinition#

Inheritance Relationships#

Base Type#

  • public NameComparable< PipelineDefinition >

Struct Documentation#

struct PipelineDefinition : public NameComparable<PipelineDefinition>#

A definition of a pipeline object/configuration.

Public Functions

inline PipelineDefinition()#

Constructor. initializes to no depth/stencil test/write, no backface culling.

Public Members

std::vector<ShaderReference> shaders#

The Shaders this pipeline uses.

std::vector<UniformSemantic> uniforms#

The Uniforms that are defined by this pipeline.

std::vector<AttributeSemantic> attributes#

The Attributes that are defined by this pipeline.

std::vector<TextureReference> textures#

The Textures that are referenced.

std::vector<BufferRef> buffers#

The buffers that are referenced.

BlendingConfig blending#

The blending configuration.

std::vector<InputAttachmentRef> inputAttachments#

The input attachments referenced.

std::vector<PipelineVertexBinding> vertexBinding#

The bindings of vertex attributes.

bool enableDepthTest#

Is depth test enabled.

bool enableDepthWrite#

Is depth write enabled.

CompareOp depthCmpFunc#

Depth testing comparison function.

bool enableStencilTest#

Is stencil test enabled.

StencilState stencilFront#

Stencil test state for Front facing polygons.

StencilState stencilBack#

Stencil test state for Back facing polygons.

PolygonWindingOrder windingOrder#

Polygon winding order (is Clockwise or Counterclockwise front?)

Face cullFace#

Face culling mode (Cull front, back, both or none?)

PipelineReference#

Struct Documentation#

struct PipelineReference#

A Reference to a pipeline definition (used in the composition of the effects)

Public Members

StringHash pipelineName#

The name of the referenced pipeline.

std::vector<PipelineCondition> conditions#

The conditions of the pipeline. Used to select different pipelines for different objects.

std::vector<StringHash> identifiers#

Any custom semantic identifiers that a pipeline reference may have exported with the conditions.

PipelineVertexBinding#

Struct Documentation#

struct PipelineVertexBinding#

A description of binding a vertex to a pipeline.

Public Functions

inline PipelineVertexBinding()#

Constructor.

inline PipelineVertexBinding(uint32_t index, StepRate stepRate)#

Constructor.

Parameters
  • index – The vertex attribute index

  • stepRate – The vertex step rate (Vertex, Draw call)

Public Members

uint32_t index#

The index where to bind this attribute.

StepRate stepRate#

The step rate of the vertex.

Shader#

Inheritance Relationships#

Base Type#

  • public NameComparable< Shader >

Struct Documentation#

struct Shader : public NameComparable<Shader>#

Store effect data from the shader block.

Public Functions

inline Shader()#

Constructor. Non-initializing.

inline Shader(StringHash &&name, ShaderType type, std::string &&source)#

Constructor from individual elements.

Parameters
  • name – The identifier of the shader.

  • type – The type of the shader (Vertex, Fragment etc)

  • source – The data of the shader (text or binary)

Public Members

std::string source#

Source data of the Shader.

ShaderType type#

Type of the shader

Subpass#

Struct Documentation#

struct Subpass#

A collection of subpass groups that will be sequentially executed. The different groups can be used to set the drawing order within the same subpass.

Public Types

enum [anonymous]#

Specifies maximum values which can be used for Subpasses.

Values:

enumerator MaxTargets#
enumerator MaxInputs#

Public Members

StringHash targets[MaxTargets]#

The targets of this subpass. May be intermediate textures/attachments, or the final render target.

StringHash inputs[MaxInputs]#

The inputs to this subpass (normally outputs from a previous subpass)

bool useDepthStencil#

If this subpass has the depth/stencil buffer enabled.

std::vector<SubpassGroup> groups#

The groups comprising this subpass.

SubpassGroup#

Struct Documentation#

struct SubpassGroup#

A collection of one or more pipelines, one of which should be conditionally picked per object to render this subpass.

Public Members

StringHash name#

The name of the group.

std::vector<PipelineReference> pipelines#

The group of pipeline references (pipelines with their selection criteria)

TextureDefinition#

Inheritance Relationships#

Base Type#

  • public NameComparable< TextureDefinition >

Struct Documentation#

struct TextureDefinition : public NameComparable<TextureDefinition>#

Stores effect texture information.

Public Functions

inline TextureDefinition()#

Constructor. Non-initializing.

inline TextureDefinition(const StringHash &name, const StringHash &path, uint32_t width, uint32_t height, const ImageDataFormat &format)#

Constructor from individual elements.

Parameters
  • name – The name of the texture

  • path – The path of the texture data

  • width – Width of the texture

  • height – Height of the texture

  • format – Format of the texture

inline bool isFile()#

Check if this texture definition is read from a file (or defined by the application)

Returns

True if a file, otherwise false<returns>

Public Members

StringHash path#

File name.

uint32_t width#

Texture width.

uint32_t height#

Texture height.

ImageDataFormat format#

Texture format

TextureRef#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct TextureRef#

Stores effect texture information.

Subclassed by pvr::effect::TextureReference

Public Functions

inline TextureRef()#

Constructor.

inline TextureRef(StringHash textureName, uint8_t set, uint8_t binding, StringHash variableName)#

Constructor.

Parameters
  • textureName – Name of the texture definition referenced

  • set – The descriptor set number to which this texture will be bound

  • binding – The index in the descriptor set where this texture will be bound

  • variableName – The variable name of the sampler in the shader. Only used for reflective shader apis (like OpenGL ES) with non-explicit bindings.

Public Members

StringHash textureName#

Name of the texture.

uint8_t set#

Descriptor set number where the texture is bound.

uint8_t binding#

Binding number of the texture in the set.

StringHash variableName#

The variable name that this texture refers to in the shader.

TextureReference#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct TextureReference : public pvr::effect::TextureRef#

Stores effect texture information.

Public Members

PackedSamplerFilter samplerFilter#

Sampler Filters.

SamplerAddressMode wrapS#

Either Clamp or Repeat.

SamplerAddressMode wrapT#

Either Clamp or Repeat.

SamplerAddressMode wrapR#

Either Clamp or Repeat.

StringHash semantic#

The semantic from which this texture will get its value.

UniformSemantic#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct UniformSemantic : public pvr::effect::DescriptorRef#

A Reference to a Uniform semantic (a free-standing shader variable).

Public Members

StringHash semantic#

The Semantic that should provide the value of this uniform.

StringHash variableName#

The variable name of the uniform in the shader.

GpuDatatypes dataType#

The datatype of the semantic.

uint32_t arrayElements#

If an array, the number of elements.

VariableScope scope#

The scope (i.e. rate of change) of the semantic.

hash#

Struct Documentation#

template<typename T>
struct hash#

Class template denoting a hash. Specializations only - no default implementation. (int32_t/int64_t/uint32_t/uint64_t/string)

Template Parameters

T – type of the value to hash.

hash< int32_t >#

Struct Documentation#

template<>
struct hash<int32_t>#

Template specialization of hash specifically for int32_t.

Public Functions

inline uint32_t operator()(int32_t value)#

Hashes the given int32_t.

Parameters

value – A int32_t value to hash

Returns

The hash value

hash< int64_t >#

Struct Documentation#

template<>
struct hash<int64_t>#

Template specialization of hash specifically for int64_t.

Public Functions

inline uint32_t operator()(int64_t value)#

Hashes the given int64_t.

Parameters

value – A int64_t value to hash

Returns

The hash value

hash< std::basic_string< T > >#

Struct Documentation#

template<typename T>
struct hash<std::basic_string<T>>#

Template specialization of hash specifically for an std::basic_string.

Public Functions

inline uint32_t operator()(const std::string &t) const#

Hashes the given string.

Parameters

t – A string value to hash

Returns

The hash value

hash< uint32_t >#

Struct Documentation#

template<>
struct hash<uint32_t>#

Template specialization of hash specifically for uint32_t.

Public Functions

inline uint32_t operator()(uint32_t value)#

Hashes the given uint32_t.

Parameters

value – A uint32_t value to hash

Returns

The hash value

hash< uint64_t >#

Struct Documentation#

template<>
struct hash<uint64_t>#

Template specialization of hash specifically for uint64_t.

Public Functions

inline uint32_t operator()(uint64_t value)#

Hashes the given uint64_t.

Parameters

value – A uint64_t value to hash

Returns

The hash value

Frustum#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct Frustum#

This class provides functionality to handle the volume enclosed by 6 planes, normally the viewing frustum. The planes are represented in Hessian Normal Form (normal, distance) as vec4( (xyz):[normal],

w:[distance from 0,0,0] )

Subclassed by pvr::math::ViewingFrustum

Public Members

glm::vec4 minusX#

The minimum X (left) plane expressed as normal-distance.

glm::vec4 plusX#

The maximum X (right) plane expressed as normal-distance.

glm::vec4 minusY#

The minimum Y (bottom) plane expressed as normal-distance.

glm::vec4 plusY#

The maximum Y (top) plane expressed as normal-distance.

glm::vec4 minusZ#

The minimum Z (near) plane expressed as normal-distance.

glm::vec4 plusZ#

The maximum Z (far) plane expressed as normal-distance.

glm::vec3 points[8]#

The set of points making up the frustum.

ViewingFrustum#

Inheritance Relationships#

Base Type#

  • public pvr::math::Frustum (Frustum)

Struct Documentation#

struct ViewingFrustum : public pvr::math::Frustum#

This class provides specialized functionality for when a frustum is a “normal”viewing frustum, that is, the following conditions hold (The conditions ARE NOT checked) Note: A “frustum side” of a plane means “the

quadrilateral of the plane that is enclosed by the 4 other planes not opposite to it” “Opposite” means the “other” side of the frustum (minusX is opposit plusX). 1) Opposite

Frustum sides do not intersect (their planes may do so outside the frustum) 2) The frustum is “opening”, or at least not “closing” accross the z axis accross all directions, meaning that the any point of the projection of the negative Z side of the frustum on the positive Z plane, is inside or on the positive Z side of the frustum. 3) Any point of a positive(negative) part of the frustum has a larger(smaller) corresponding coordinate than its opposite part 4) All plane normals point INTO of the frustum These optimizations allow us to greatly reduce the calculations for a viewing frustum.

Public Functions

inline bool isFrustum() const#

Check if a Viewing Frustum is valid (the viewing frustum conditions hold)

Returns

True if a Viewing Frustum, otherwise False

ParsedCommandLine::Option#

Nested Relationships#

This struct is a nested type of CommandLineParser::ParsedCommandLine.

Struct Documentation#

struct Option

A c-style std::string name-value pair that represents command line argument (arg: name, val: value)

Public Functions

inline bool operator==(const Option &rhs) const

Equality.

Parameters

rhs – Right hand side of the operator

Returns

True if left and right side are equal, otherwise false

inline bool operator==(const char *rhs) const

Equality to c-string.

Parameters

rhs – Right hand side of the operator

Returns

True if left and right side are equal, otherwise false

Public Members

const char *arg

Argument name (i.e. -Width)

const char *val

Argument value (i.e. 640)

ivec3#

Struct Documentation#

struct ivec3#

Simple ivec3 representation.

Public Members

int32_t x#

x component

int32_t y#

y component

int32_t z#

z component

CoreHeader#

Struct Documentation#

struct CoreHeader#

Structure of a core header for a BMP file.

Public Members

uint32_t headerSize#

Size of the header.

uint16_t width#

Width of the BMP.

uint16_t height#

Height of the BMP.

uint16_t numPlanes#

Number of planes in the BMP.

uint16_t bitsPerPixel#

Bits per pixel used by the BMP.

FileHeader#

Struct Documentation#

struct FileHeader#

Structure of a file header for a BMP file.

Public Members

uint16_t signature#

Signature.

uint32_t fileSize#

Size of the BMP file.

uint16_t reserved1#

Reserved.

uint16_t reserved2#

Reserved.

uint32_t pixelOffset#

Pixel offset.

InfoHeader1#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct InfoHeader1#

Structure of a info header1 for a BMP file.

Subclassed by pvr::texture_bmp::InfoHeader2

Public Members

uint32_t headerSize#

Size of the header.

int32_t width#

Width of the BMP.

int32_t height#

Height of the BMP.

uint16_t numPlanes#

Number of planes in the BMP.

uint16_t bitsPerPixel#

Bits per pixel used by the BMP.

uint32_t compressionType#

Compression type used.

uint32_t imageSize#

Size of the image.

int32_t horizontalPixelsPerMeter#

The number of pixels per meter in the horizontal direction.

int32_t verticalPixelsPerMeter#

The number of pixels per meter in the vertical direction.

uint32_t numColorsInTable#

The number of colors included in the provided table.

uint32_t numImportantColors#

The number of the colors in the table which are important.

InfoHeader2#

Inheritance Relationships#

Base Type#

Derived Type#

Struct Documentation#

struct InfoHeader2 : public pvr::texture_bmp::InfoHeader1#

Structure of a info header2 for a BMP file.

Subclassed by pvr::texture_bmp::InfoHeader3

Public Members

uint32_t redMask#

A red channel mask.

uint32_t greenMask#

A green channel mask.

uint32_t blueMask#

A blue channel mask.

InfoHeader3#

Inheritance Relationships#

Base Type#

Derived Type#

Struct Documentation#

struct InfoHeader3 : public pvr::texture_bmp::InfoHeader2#

Structure of a info header3 for a BMP file.

Subclassed by pvr::texture_bmp::InfoHeader4

Public Members

uint32_t alphaMask#

An alpha channel mask.

InfoHeader4#

Inheritance Relationships#

Base Type#

Derived Type#

Struct Documentation#

struct InfoHeader4 : public pvr::texture_bmp::InfoHeader3#

Structure of a info header4 for a BMP file.

Subclassed by pvr::texture_bmp::InfoHeader5

Public Members

int32_t colorSpace#

The color space being employed.

ivec3 xyzEndPoints[3]#

XYZ component end points.

uint32_t gammaRed#

Gamma used by the red component.

uint32_t gammaGreen#

Gamma used by the green component.

uint32_t gammaBlue#

Gamma used by the blue component.

InfoHeader5#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct InfoHeader5 : public pvr::texture_bmp::InfoHeader4#

Structure of a info header5 for a BMP file.

Public Members

uint32_t intent#

The intent.

uint32_t profileData#

Profile data.

uint32_t profileSize#

The profile size.

uint32_t reserved#

Reserved.

FileHeader#

Struct Documentation#

struct FileHeader#

File header format for DDS files.

Public Members

uint32_t size#

The size of the DDS File.

uint32_t flags#

The flags used by the DDS.

uint32_t height#

The height of the image.

uint32_t width#

The width of the image.

uint32_t pitchOrLinearSize#

Specifies the pitch or linear size of the image.

uint32_t depth#

The depth of the image.

uint32_t numMipMaps#

The number of mip maps.

uint32_t reserved[11]#

Reserved bits.

PixelFormat pixelFormat#

The pixel format used.

uint32_t Capabilities1#

Capabilities.

uint32_t Capabilities2#

Capabilities.

uint32_t Capabilities3#

Capabilities.

uint32_t Capabilities4#

Capabilities.

uint32_t reserved2#

Reserved.

FileHeaderDX10#

Struct Documentation#

struct FileHeaderDX10#

File header for DX10.

Public Members

uint32_t dxgiFormat#

The format.

uint32_t resourceDimension#

The dimension of the resource.

uint32_t miscFlags#

See DDS_RESOURCE_MISC_FLAG.

uint32_t arraySize#

The array size.

uint32_t miscFlags2#

Flags.

PixelFormat#

Struct Documentation#

struct PixelFormat#

Pixel format used in DDS files.

Public Members

uint32_t size#

The size of the DDS file.

uint32_t flags#

Flags for the DDS file.

uint32_t fourCC#

Meant to be four characters, but is easier to manage with a MAKEFOURCC value.

uint32_t bitCount#

The bit count used in the DDS file.

uint32_t redMask#

A red channel mask.

uint32_t greenMask#

A green channel mask.

uint32_t blueMask#

A blue channel mask.

uint32_t alphaMask#

An alpha channel mask.

FileHeader#

Struct Documentation#

struct FileHeader#

Khronos texture file header.

Public Members

uint8_t identifier[12]#

The identifier used for KTX files.

uint32_t endianness#

The endianness used.

uint32_t glType#

The gl type.

uint32_t glTypeSize#

The size of the gl type.

uint32_t glFormat#

The gl format.

uint32_t glInternalFormat#

The internal format.

uint32_t glBaseInternalFormat#

The base internal format.

uint32_t pixelWidth#

The width of the KTX in pixels.

uint32_t pixelHeight#

The height of the KTX in pixels.

uint32_t pixelDepth#

The depth of the KTX in pixels.

uint32_t numArrayElements#

The number of array elements.

uint32_t numFaces#

The number of faces.

uint32_t numMipmapLevels#

The number of mip map levels.

uint32_t bytesOfKeyValueData#

The bytes of key value data.

HeaderV1#

Inheritance Relationships#

Derived Type#

  • public pvr::texture_legacy::HeaderV2 (HeaderV2)

Struct Documentation#

struct HeaderV1#

Version 1 of the PVR file format.

Subclassed by pvr::texture_legacy::HeaderV2

Public Members

uint32_t headerSize#

size of the structure

uint32_t height#

height of surface to be created

uint32_t width#

width of input surface

uint32_t numMipMaps#

number of mip-map levels requested

uint32_t pixelFormatAndFlags#

pixel format flags

uint32_t dataSize#

Size of the compress data.

uint32_t bitCount#

number of bits per pixel

uint32_t redBitMask#

mask for red bit

uint32_t greenBitMask#

mask for green bits

uint32_t blueBitMask#

mask for blue bits

uint32_t alphaBitMask#

mask for alpha channel

HeaderV2#

Inheritance Relationships#

Base Type#

  • public pvr::texture_legacy::HeaderV1 (HeaderV1)

Struct Documentation#

struct HeaderV2 : public pvr::texture_legacy::HeaderV1#

Version 2 of the PVR file format.

Public Members

uint32_t pvrMagic#

magic number identifying pvr file

uint32_t numSurfaces#

the number of surfaces present in the pvr

FileHeader#

Struct Documentation#

struct FileHeader#

Structure of a file header for a TGA file.

Public Members

uint8_t identSize#

size of ID field that follows 18 char header (0 usually)

uint8_t colorMapType#

type of color map 0=none, 1=has palette

uint8_t imageType#

type of image 0=none,1=indexed,2=rgb,3=grey,+8=rle packed

int16_t colorMapStart#

first color map entry in palette

int16_t colorMapLength#

number of colors in palette

uint8_t colorMapBits#

number of bits per palette entry 15,16,24,32

int16_t xStart#

image x origin

int16_t yStart#

image y origin

int16_t width#

image width in pixels

int16_t height#

image height in pixels

uint8_t bits#

image bits per pixel 8,15,16,24,32

uint8_t descriptor#

image descriptor bits (vh flip bits)

FileHeader#

Struct Documentation#

struct FileHeader#

File header format for XNB files.

Public Members

uint8_t identifier[3]#

Identifier used for XNB files.

uint8_t platform#

The platform used.

uint8_t version#

The version of the XNB file.

uint8_t flags#

Flags used.

uint32_t fileSize#

The size of the file.

Texture2DHeader#

Struct Documentation#

struct Texture2DHeader#

Texture 2D header for XNB files.

Public Members

int32_t format#

The format used.

uint32_t width#

The width ofthe image.

uint32_t height#

The height of the image.

uint32_t numMipMaps#

The number of mip maps used.

Texture3DHeader#

Struct Documentation#

struct Texture3DHeader#

Texture 3D header for XNB files.

Public Members

int32_t format#

The format used.

uint32_t width#

The width of the image.

uint32_t height#

The height of the image.

uint32_t depth#

The depth of the image.

uint32_t numMipMaps#

The number of mip maps used.

TextureCubeHeader#

Struct Documentation#

struct TextureCubeHeader#

Texture Cube header for XNB files.

Public Members

int32_t format#

The format used.

uint32_t size#

The size of the image.

uint32_t numMipMaps#

The number of mip maps used.

BlendingConfig#

Struct Documentation#

struct BlendingConfig#

Add blending configuration for a color attachment. Some API’s only support one blending state for all attachments, in which case the 1st such configuration will be used for all.

&#8212; Defaults &#8212; Blend Enabled:false, Source blend Color factor: false, Destination blend Color factor: Zero, Source blend Alpha factor: Zero, Destination blending Alpha factor :Zero, Blending operation color: Add, Blending operation alpha: Add, Channel writing mask: All

Public Functions

inline BlendingConfig(bool blendEnable = false, BlendFactor srcBlendColor = BlendFactor::One, BlendFactor dstBlendColor = BlendFactor::Zero, BlendOp blendOpColor = BlendOp::Add, BlendFactor srcBlendAlpha = BlendFactor::One, BlendFactor dstBlendAlpha = BlendFactor::Zero, BlendOp blendOpAlpha = BlendOp::Add, ColorChannelFlags channelWriteMask = ColorChannelFlags::All)#

Create a blending state. Separate color/alpha factors.

Parameters
  • blendEnable – Enable blending (default false)

  • srcBlendColor – Source Blending color factor (default:Zero)

  • dstBlendColor – Destination blending color factor (default:Zero)

  • srcBlendAlpha – Source blending alpha factor (default:Zero)

  • dstBlendAlpha – Destination blending alpha factor (default:Zero)

  • blendOpColor – Blending operation color (default:Add)

  • blendOpAlpha – Blending operation alpha (default:Add)

  • channelWriteMask – Channel writing mask (default:All)

inline BlendingConfig(bool blendEnable, BlendFactor srcBlendFactor, BlendFactor dstBlendFactor, BlendOp blendOpColorAlpha, ColorChannelFlags channelWriteMask = ColorChannelFlags::All)#

Create a blending state. Common color and alpha factors.

Parameters
  • blendEnable – Enable blending (default false)

  • srcBlendFactor – Source Blending factor

  • dstBlendFactor – Destination Blending factor

  • blendOpColorAlpha – Blending operation color & alpha (default:Add)

  • channelWriteMask – Channel writing mask (default:All)

Public Members

bool blendEnable#

Enable blending.

BlendFactor srcBlendColor#

Source Blending color factor.

BlendFactor dstBlendColor#

Destination blending color factor.

BlendOp blendOpColor#

Blending operation color.

BlendFactor srcBlendAlpha#

Source blending alpha factor.

BlendFactor dstBlendAlpha#

Destination blending alpha factor.

BlendOp blendOpAlpha#

Blending operation alpha.

ColorChannelFlags channelWriteMask#

Channel writing mask.

CameraAnimationController#

Struct Documentation#

struct CameraAnimationController#

A simple structure for controlling camera animations.

Public Functions

inline CameraAnimationController()#

Default Constructor.

inline void restart()#

Restarts the camera animation controller.

inline void setTotalTimeInMs(uint64_t totalMs)#

Sets the current total time in MS.

Parameters

totalMs – The current tile in milli seconds

inline void advanceTime(uint64_t dt)#

Advances the current total time in MS.

Parameters

dt – The number of milli seconds to advance the time by

inline glm::vec3 getPosition() const#

Retrieves the position for the current time.

Returns

The camera key frame position based on the current time

inline glm::vec2 getOrientation() const#

Retrieves the orientation for the current time.

Returns

The camera key frame orientation based on the current time

inline uint32_t getCurrentBeginKeyFrame() const#

Retrieves the current beginning of the key frame for the current time.

Returns

The current beginning of the key frame for the current time

inline uint32_t getCurrentEndKeyFrame() const#

Retrieves the current end of the key frame for the current time.

Returns

The current end of the key frame for the current time

inline uint64_t getNumKeyFrames() const#

Retrieves the number of key frames.

Returns

The number of key frames currently being controlled

inline void addKeyFrames(const CameraKeyFrame *keyFrames, uint32_t numKeyFrames)#

Adds a new key frame.

Parameters
  • keyFrames – A pointer to a list of key frames

  • numKeyFrames – The number of key frames pointed to by keyFrames

Public Members

std::vector<CameraKeyFrame> keyframes#

The current set of key frames.

uint32_t startKeyFrame#

The start of the key frames.

uint32_t endKeyFrame#

The end of the key frames.

uint64_t globalMs#

The global ms.

uint64_t localMs#

The local ms.

uint64_t totalKeyFrameMs#

The total key frame ms.

CameraKeyFrame#

Struct Documentation#

struct CameraKeyFrame#

A simple structure for handling key camera frames.

Public Functions

inline CameraKeyFrame(uint64_t frameMs, const glm::vec3 &pos, const glm::vec2 &orientation)#

Constructor.

Parameters
  • frameMs – The key frame in ms

  • pos – The camera key frame position

  • orientation – The camera key frame orienation

inline CameraKeyFrame()#

Default Constructor.

Public Members

uint64_t frameMs#

The key frame in ms.

glm::vec3 position#

The camera key frame position.

glm::vec2 orientation#

The camera key frame orienation.

CompressedImageDataFormat#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct CompressedImageDataFormat#

Describes a Compressed format. Compressed formats provide less information than the uncompressed format, as they can only be accessed “black box”.

Subclassed by pvr::ImageStorageFormatCompressed

Public Members

CompressedPixelFormat format#

compressed format

FreeValue#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct FreeValue : public pvr::FreeValueView#

A Free Value View that is backed by a 64-byte statically allocated array: Enough to hold one item of any GPU-datatype, up to a mat4x4.

Public Functions

inline FreeValue()#

Constructor. Non-initializing (undefined value)

template<typename Type_>
inline FreeValue(const Type_ &rawvalue)#

Constructor. Set to the value of the passed object.

Template Parameters

Type_ – The type of the value. Used to interpret the object and also set the datatype.

Parameters

rawvalue – Copy this value

inline void setDataType(GpuDatatypes datatype)#

Define the datatype of this FreeValue.

Parameters

datatype – The datatype to define this FreeValue.

template<typename Type_>
inline void setValue(const Type_ &rawvalue)#

Set the value of this object.

Template Parameters

Type_ – The type of the value. Used to interpret the object and alos set the datatype.

Parameters

rawvalue – Copy this value

inline void setValue(FreeValueView &other)#

Set the value of this object from any FreeValue object.

Parameters

other – Copy this item’s value. If an array, copy the first item only.

inline void setValue(const char *c_string_value)#

Set the value of this object from a null-terminated c-style string. Truncates to 64 bytes.

Parameters

c_string_value – The value to copy

inline void setValue(const std::string &rawvalue)#

Set the value of this object from a c++ string. Truncates to 64 bytes.

Parameters

rawvalue – The value to copy

inline void fastSet(GpuDatatypes type, char *value)#

Copy a value from a given untyped pointer. The type of the value is ONLY used for the size to copy - no conversion is performed - only a bit-for-bit copy. If the value is incompatible, the behaviour is undefined/.

Parameters
  • type – The type of the value to copy.

  • value – The value to copy.

template<typename Type_>
inline Type_ &interpretValueAs()#

Read the value as if it was of the specified type.

Template Parameters

Type_ – Interpret the value as an object of this type and return a reference to it

Returns

A reference to the object, interpreted as of the specified Type

template<typename Type_>
inline const Type_ &interpretValueAs() const#

Read the value as if it was of the specified type.

Template Parameters

Type_ – Interpret the value as an object of this type and return a reference to it

Returns

A reference to the object, interpreted as of the specified Type

template<typename Type_>
inline Type_ castValueScalarToScalar() const#

Assuming the value is a scalar, cast it to the specified type and return it. If the type parameter is different than the actual parameter contained, will perform a normal type conversion before returning the value. Can only be used if the type contained is not a vector or matrix, otherwise logs error and returns an empty value.

Template Parameters

Type_ – The type of the return value. If different than the exact type, a simple conversion is done.

Returns

A reference to the object, interpreted as of the specified Type. If the datatype is not scaler, returns (Type_)0

template<typename Type_>
inline Type_ castValueVectorToVector() const#

Assuming the contained value is a vector, cast it to the specified type and return it. If the type parameter is different than the actual parameter contained, will perform a normal type conversion before returning the value. Can only be used if the type contained is not a scalar or matrix, otherwise logs error and returns an empty value.

Template Parameters

Type_ – The type of the return value. If different than the exact type, a simple conversion is done.

Returns

A reference to the object, interpreted as of the specified Type. If the datatype is not vector, returns (Type_)0

template<typename Type_>
inline Type_ castValueMatrixToMatrix() const#

Assuming the contained value is a matrix, cast it to the specified type and return it. If the type parameter is different than the actual parameter contained, will perform a normal type conversion before returning the value. Can only be used if the type contained is not a scalar or vector, otherwise logs error and returns an empty value.

Template Parameters

Type_ – The type of the return value. If different than the exact type, a simple conversion is done.

Returns

A reference to the object, interpreted as of the specified Type. If the datatype is not matrix, returns (Type_)0

inline const char *getValueAsString() const#

Assuming the contained value is a string, return it, otherwise logs error and returns an empty string.

Returns

The contained string. If the datatype is not a string, returns “”

Public Members

double _alignment_[8]#
unsigned char chars_[64]#
int32_t integer32_[16]#
float float32_[16]#
int16_t int16_[16]#
int64_t int64_[8]#

GenericExtent2D#

Inheritance Relationships#

Derived Type#

Struct Documentation#

template<typename T>
struct GenericExtent2D#

Contains a 2d Integer size (width, height)

Template Parameters

T – The generic type T to use

Subclassed by pvr::GenericExtent3D< uint32_t, uint32_t >

Public Functions

inline GenericExtent2D(T width = 0, T height = 0)#

Constructor by width and height.

Parameters
  • width – Horizontal size

  • height – Vertical size

Public Members

T width#

Size along X axis.

T height#

Size along Y axis

GenericExtent3D#

Inheritance Relationships#

Base Type#

Struct Documentation#

template<typename Txy, typename Tz>
struct GenericExtent3D : public pvr::GenericExtent2D<Txy>#

Contains a 3D Integer size (width, height, depth)

Public Functions

inline GenericExtent3D()#

Constructor.

inline GenericExtent3D(Txy width, Txy height, Tz depth = 1)#

Constructor.

Parameters
  • width – Horizontal size (default 1)

  • height – Vertical size (default 1)

  • depth – Depth size (default 1)

inline GenericExtent3D(const GenericExtent2D<Txy> &extent2D, Tz depth = 1)#

Constructor from GenericExtent2D.

Parameters
  • extent2D – Vertical and horizontal size

  • depth – Depth size (default 1)

Public Members

Tz depth#

Size along Z axis.

GenericOffset2D#

Inheritance Relationships#

Derived Type#

Struct Documentation#

template<typename T>
struct GenericOffset2D#

The GenericOffset2D contains a 16-bit 2D offset (offsetX, offsetY)

Subclassed by pvr::GenericOffset3D< int32_t, int32_t >

Public Functions

inline GenericOffset2D(T offsetX = 0, T offsetY = 0)#

Constructor. Defaults to (0,0)

Parameters
  • offsetX – Offset in the X direction. (Default 0)

  • offsetY – Offset in the Y direction. (Default 0)

inline GenericOffset2D operator+(const GenericExtent2D<typename std::make_unsigned<T>::type> &rhs) const#

Sum this Offset with an Extent.

Parameters

rhs – The right hand side of the additions

Returns

The result of this offset plus the extent rhs

inline GenericOffset2D &operator+=(const GenericExtent2D<typename std::make_unsigned<T>::type> &rhs)#

Add an Extent to this Offset.

Parameters

rhs – The right hand side of the additions

Returns

This object, which now contains This offset plus the extent rhs

Public Members

T x#

offset in x axis

T y#

offset in y axis

GenericOffset3D#

Inheritance Relationships#

Base Type#

Struct Documentation#

template<typename Txy, typename Tz>
struct GenericOffset3D : public pvr::GenericOffset2D<Txy>#

The GenericOffset3D contains the offsets in 3 dimension (offsetX, offsetY, offsetZ)

Public Functions

inline GenericOffset3D(Txy offsetX = 0, Txy offsetY = 0, Tz offsetZ = 0)#

Constructor. Defaults to (0,0,0)

Parameters
  • offsetX – Offset in the X direction. (Default 0)

  • offsetY – Offset in the Y direction. (Default 0)

  • offsetZ – Offset in the Z direction. (Default 0)

inline GenericOffset3D operator+(const GenericExtent3D<typename std::make_unsigned<Txy>::type, typename std::make_unsigned<Tz>::type> &rhs) const#

Sum this Offset with an Extent.

Parameters

rhs – The right hand side of the additions

Returns

The result of this offset plus the extent rhs

inline GenericOffset3D &operator+=(const GenericExtent3D<typename std::make_unsigned<Txy>::type, typename std::make_unsigned<Tz>::type> &rhs)#

Add an Extent to this Offset.

Parameters

rhs – The right hand side of the additions

Returns

This object, which now contains This offset plus the extent rhs

inline GenericOffset3D(const GenericOffset2D<Txy> &offsetXY, Tz offsetZ = 0)#

Constructor.

Parameters
  • offsetXY – The 2D part of the offset

  • offsetZ – The depth of the offset. (Default 0)

Public Members

Tz z#

offset in z axis

Metadata#

Struct Documentation#

template<typename>
struct Metadata#

Metadata for mapping GpuDatatypes to actual types. Specializations provide the following members: storagetype, dataType, gpuSize, .

ImageDataFormat#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct ImageDataFormat#

Represents an image format, including pixel format(channels/bits per channel), datatype and colorspace. /summary>

Subclassed by pvr::ImageStorageFormat

Public Functions

inline explicit ImageDataFormat(const PixelFormat &format = PixelFormat::RGBA_8888(), VariableType dataType = VariableType::UnsignedByteNorm, ColorSpace colorSpace = ColorSpace::lRGB)#

Constructor. Creates a new ImageDataFormat. Default item is RGBA8888/UBYTE/lRGB.

Parameters
  • format – The Pixel format. Default is RGBA_8888

  • dataType – The datatype. Default is UnsignedIntNormalized

  • colorSpace – The colorspace. Default is lRGB

inline bool operator==(const ImageDataFormat &rhs) const#

Equality operator. All content must be equal for it to return true.

Parameters

rhs – The right hand side of the operator

Returns

true if the right hand object is same as this.

inline bool operator!=(const ImageDataFormat &rhs) const#

Inequality operator. Equivalent to !(==)

Parameters

rhs – The right hand side of the operator

Returns

true if the right hand object is not same as this

Public Members

PixelFormat format#

pixel format

VariableType dataType#

datatype

ColorSpace colorSpace#

colorspace, e.g lRGB

ImageLayersSize#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct ImageLayersSize#

Structure describes the number of array levels, mip levels and planes an image contains.

Subclassed by pvr::ImageSubresourceRange

Public Functions

inline ImageLayersSize(uint16_t numArrayLevels = 1, uint8_t numMipLevels = 1, uint8_t numPlaneLevels = 1)#

Constructor. All arguments optional.

Parameters
  • numArrayLevels – The number of array levels represented by this range. (Default 1).

  • numMipLevels – The number of mipmap levels represented by this range. (Default 1).

  • numPlaneLevels – The number of plane levels represented by this range. (Default 1).

Public Members

uint16_t numArrayLevels#

The number of array slices of the range.

uint16_t numMipLevels#

The number of mipmap levels of the range.

uint16_t numPlaneLevels#

The number of planes of the range.

ImageRange#

Inheritance Relationships#

Base Types#

Struct Documentation#

struct ImageRange : public pvr::GenericExtent3D<uint32_t, uint32_t>, public pvr::GenericOffset3D<int32_t, int32_t>#

Represents a specific 3-D range in an image (an orthogonal cuboid anywhere in the image)

Public Functions

inline ImageRange()#

ImageRange.

inline ImageRange(const Extent3D &extents, const Offset3D &offset)#

ImageRange.

Parameters
  • extents

  • offset

ImageResolveRange#

Struct Documentation#

struct ImageResolveRange#

Represents an image resolve operation.

Public Functions

inline ImageResolveRange()#

Constructor.

inline ImageResolveRange(const Offset3D &srcOffset0, const Offset3D &dstOffset0, const Extent3D &extent0, const ImageSubresourceLayers &srcSubResource = ImageSubresourceLayers(), const ImageSubresourceLayers &dstSubResource = ImageSubresourceLayers())#

Constructor.

Parameters
  • srcOffset0 – The source region’s offset (bottom-left corner)

  • dstOffset0 – The destination region’s offset (bottom-left corner)

  • extent0 – Size of both Source and Destination regions (as src must be equal to dst)

  • srcSubResource – Source region subresource layers

  • dstSubResource – Destination region subresource layers

Public Members

Offset3D srcOffset#

Source Region initial offset.

Offset3D dstOffset#

Destination Region initial offset.

Extent3D extent#

Size of the regions (as src must be equal to dst)

ImageSubresourceLayers srcSubResource#

Source region subresource layers.

ImageSubresourceLayers dstSubResource#

Destination region subresource layers.

ImageStorageFormat#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct ImageStorageFormat : public pvr::ImageDataFormat#

Extends the ImageDataFormat with mipmaps and number of Samples.

Public Functions

inline ImageStorageFormat(const PixelFormat &format = PixelFormat::RGBA_8888(), uint8_t numMipMapLevels = 1, ColorSpace colorSpace = ColorSpace::lRGB, VariableType dataType = VariableType::UnsignedByteNorm, uint8_t numSamples = 1, uint8_t numPlanes = 1)#

Constructor. Initializes to the provided values.

Parameters
  • format – Pixel format

  • numMipMapLevels – Number of mip levels

  • colorSpace – Color space (linear RGB or sRGB)

  • dataType – The DataType

  • numSamples – number of samples

  • numPlanes – number of planes

inline ImageStorageFormat(const ImageDataFormat &dataFmt, uint8_t numMipMapLevels = 1, uint8_t numSamples = 1, uint8_t numPlanes = 1)#

Constructor. Initializes to the provided values.

Parameters
  • dataFmt – The ImageDataFormat (will be copied as is)

  • numMipMapLevels – Number of mip levels

  • numSamples – number of samples

Public Members

uint8_t numMipMapLevels#

number of mip levels

uint8_t numSamples#

number of samples

uint8_t numPlanes#

number of planes

ImageStorageFormatCompressed#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct ImageStorageFormatCompressed : public pvr::CompressedImageDataFormat#

Describes a Compressed format. Compressed formats provide less information than the uncompressed format, as they can only be accessed “black box”.

Public Members

int8_t numMipMapLevels#

number of mip levels

ImageSubresource#

Inheritance Relationships#

Derived Types#

Struct Documentation#

struct ImageSubresource#

Describes a single “layer” of an image: a single array layer of a single mip level, or the offset of a layer range.

Subclassed by pvr::ImageSubresourceLayers, pvr::ImageSubresourceRange

Public Functions

inline ImageSubresource(ImageAspectFlags aspectFlags = ImageAspectFlags::Color, uint16_t mipLevelOffset = 0, uint16_t arrayLayerOffset = 0, uint16_t planeOffset = 0)#

Constructor. All arguments optional.

Parameters
  • aspectFlags – The aspect(s) of the subresource (Color/Depth/Stencil/DepthStencil)

  • mipLevelOffset – The index of the array slice. In case of a range, the offset of the first layer. (Default 0)

  • arrayLayerOffset – The index of the mipmap level. In case of a range, the offset of the first mipmap level. (Default 0)

Public Members

ImageAspectFlags aspect#

The Aspect of the subresource (Color, Depth, Stencil, Depth&Stencil)

uint16_t arrayLayerOffset#

The index of the array slice. In case of a range, the offset of the first layer.

uint16_t mipLevelOffset#

The index of the mipmap level. In case of a range, the offset of the first mipmap level.

uint16_t planeOffset#

The index of the plane. In case of a range, the offset of the first plane.

ImageSubresourceLayers#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct ImageSubresourceLayers : public pvr::ImageSubresource#

Represents a specific subresource layer: A specified Array Layer and Mipmap level of specific aspect of an image.

Public Functions

inline ImageSubresourceLayers()#
inline ImageSubresourceLayers(ImageSubresource baseLayers, uint16_t numArrayLayers)#

Constructor.

Parameters
  • baseLayers – Base layers

  • numArrayLayers – Number of array layers

Public Members

uint16_t numArrayLayers#

Constructor.

Number of array layers

ImageSubresourceRange#

Inheritance Relationships#

Base Types#

Struct Documentation#

struct ImageSubresourceRange : public pvr::ImageLayersSize, public pvr::ImageSubresource#

Represents a subresource range: A specified range of Array Layers and Mipmap levels of specific aspect of an image.

Public Functions

inline ImageSubresourceRange()#

Constructor.

inline ImageSubresourceRange(const ImageLayersSize &layersSize, const ImageSubresource &baseLayers)#

Constructor.

Parameters
  • layersSize – Layers size

  • baseLayers – Base layers

PixelFormat::LowHigh#

Nested Relationships#

This struct is a nested type of PixelFormat.

Struct Documentation#

struct LowHigh

64 bit Integer representation as 32 lower bits and 32 higher bits

Public Members

uint32_t Low

Lower 32-bits of the pixel format storage.

uint32_t High

Higher 32-bits of the pixel format storage.

Rectangle#

Struct Documentation#

template<typename TYPE>
struct Rectangle#

A class representing an axis-aligned rectangle. Internal representation TopLeft and size.

Template Parameters

TYPE – The datatype of the units of the rectangle (int, float etc.)

Public Functions

inline glm::tvec2<TYPE, glm::highp> offset() const#

Get the offset of the rectangle, i.e. the position of its minimum (bottom-left) vertex.

Returns

The position of its minimum (bottom-left) vertex

inline glm::tvec2<TYPE, glm::highp> extent() const#

Get the extent (i.e. size) of the rectangle.

Returns

A vec2 containing the sizes per component (width in x, height in y)

inline glm::tvec2<TYPE, glm::highp> center() const#

Get the position of the center of the rectangle.

Returns

The position of the center of the rectangle

inline Rectangle()#

Create a rectangle with uninitialized values.

inline Rectangle(const GenericOffset2D<TYPE> &offset0, const GenericOffset2D<TYPE> &offset1)#

Copy construct a rectangle from two corners as offsets. It is an error and will have undefined results for any component (x or y) of offset1 to be less than the corresponding component of offset0.

Parameters
  • offset0 – Minimum (lesser value for both axes, usually means bottom-left) corner of the new rectangle

  • offset1 – Maximum (greater value for both axes, usually means top-right) corner of the rectangle

inline Rectangle(TYPE TX, TYPE TY, TYPE TWidth, TYPE THeight)#

Create a rectangle with initial values.

Parameters
  • TX – The x-coordinate of the left of the rectangle

  • TY – The y-coordinate of the bottom of the rectangle

  • TWidth – The width of the rectangle

  • THeight – The height of the rectangle

inline Rectangle(glm::tvec2<TYPE, glm::precision::defaultp> bottomLeft, glm::tvec2<TYPE, glm::precision::defaultp> dimensions)#

Create a rectangle with initial values.

Parameters
  • bottomLeft – The bottom-left corner of the rectangle (bottom, left)

  • dimensions – The dimensions(width, height)

inline bool operator==(const Rectangle &rhs) const#

Test equality.

Parameters

rhsRectangle to test against.

Returns

True if rectangles are exactly equal (corners completely coincide), otherwise false.

inline bool operator!=(const Rectangle &rhs) const#

Test equality.

Parameters

rhsRectangle to test against.

Returns

True if rectangles are not exactly equal (at least one corner different), otherwise false.

inline void expand(const Rectangle &rect)#

Expand this rectangle so that it also contains the given rectangle. Equivalently: Set this rectangle’s min corner to the min of this and rect min corner, and the max corner to the max of this and rect’s max corner.

Parameters

rect – The other rectangle to extend.

Public Members

TYPE x#

The x-coordinate of the left side of the rectangle.

TYPE y#

The y-coordinate of the bottom side of the rectangle.

TYPE width#

The width of the rectangle.

TYPE height#

The height of the rectangle.

Rectangle3D#

Struct Documentation#

template<typename TYPE>
struct Rectangle3D#

A class representing an Axis-Aligned cuboidal region of 3D space. Internal representation offset defined as the absolute coordinates of one corner of the bounding region and extent which defines the second corner of the bounding region relative to the offset.

Template Parameters

TYPE – The datatype of the units of the 3 dimesional rectangle (int, float etc.)

Public Functions

inline glm::tvec3<TYPE, glm::highp> offset() const#

The offset of the rectangle is the minimum vertex (the vertex with the smalles coordinate in each of the x,y,z components.

Returns

The minimum vertex (usually this means “bottom”-“left”-“back”)

inline glm::tvec3<TYPE, glm::highp> extent() const#

The extent (aka size, aka width/height/depth) of the cuboid.

Returns

The extent, a 3D vector composed of the size at x,y,z: (width, height, depth)

inline glm::tvec3<TYPE, glm::highp> center() const#

The position of the center of the cuboid.

Returns

The center of the cuboid

inline Rectangle3D()#

Create a 3d rectangle with uninitialized values.

inline Rectangle3D(TYPE absoluteX, TYPE absoluteY, TYPE absoluteZ, TYPE width, TYPE height, TYPE depth)#

Create a 3 dimensional rectangle with initial values.

Parameters
  • absoluteX – The absolute x-coordinate of the left of the rectangle

  • absoluteY – The absolute y-coordinate of the bottom of the rectangle

  • absoluteZ – The absolute z-coordinate of the front of the rectangle

  • width – The width of the rectangle

  • height – The height of the rectangle

  • depth – The height of the rectangle

inline Rectangle3D(glm::tvec3<TYPE, glm::precision::defaultp> minimumVertex, glm::tvec3<TYPE, glm::precision::defaultp> dimensions)#

Create a rectangle with initial values.

Parameters
  • minimumVertex – The minimum vertex of the 3 dimensional rectangle (bottom, left, usually front)

  • dimensions – The dimensions(width, height, depth)

inline bool operator==(const Rectangle3D &rhs) const#

Equality operator (exact).

Parameters

rhs – The right hand side of the operator

Returns

True if the rectangles coincide (all vertices exactly equal), otherwise false.

inline bool operator!=(const Rectangle3D &rhs) const#

Inequality operator (exact).

Parameters

rhs – The right hand side of the operator

Returns

True if the two rectangles do not exactly coincide (at least one vertex not exactly equal), otherwise false.

inline void expand(const Rectangle3D &rect)#

Expand this rectangle to also contain the given rectangle. Equivalently, set this rectangles minimum vertex to the minimum of this and rect’s min vertex, and set this rectangle’s max vertex to the maximum of this rectangle’s and.

Parameters

rect – The rectangle that we will ensure is covered

Public Members

TYPE x#

The x-coordinate of the left side of the cuboid.

TYPE y#

The y-coordinate of the bottom side of the cuboid.

TYPE z#

The z-coordinate of the front of the cuboid.

TYPE width#

The width of the cuboid.

TYPE height#

The height of the cuboid.

TYPE depth#

The depth of the cuboid.

StencilState#

Struct Documentation#

struct StencilState#

Pipeline Stencil state.

Public Functions

inline StencilState(StencilOp depthPass = StencilOp::Keep, StencilOp depthFail = StencilOp::Keep, StencilOp stencilFail = StencilOp::Keep, CompareOp compareOp = CompareOp::DefaultStencilFunc, uint32_t compareMask = 0xff, uint32_t writeMask = 0xff, uint32_t reference = 0)#

Constructor from all parameters.

Parameters
  • depthPass – Action performed on samples that pass both the depth and stencil tests.

  • depthFail – Action performed on samples that pass the stencil test and fail the depth test.

  • stencilFail – Action performed on samples that fail the stencil test.

  • compareOp – Comparison operator used in the stencil test.

  • compareMask – Selects the bits of the unsigned Integer stencil values during in the stencil test.

  • writeMask – Selects the bits of the unsigned Integer stencil values updated by the stencil test in the stencil framebuffer attachment

  • reference – Integer reference value that is used in the unsigned stencil comparison.

Public Members

StencilOp opDepthPass#

Action performed on samples that pass both the depth and stencil tests.

StencilOp opDepthFail#

Action performed on samples that pass the stencil test and fail the depth test.

StencilOp opStencilFail#

Action performed on samples that fail the stencil test.

uint32_t compareMask#

Selects the bits of the unsigned Integer stencil values during in the stencil test.

uint32_t writeMask#

Selects the bits of the unsigned Integer stencil values updated by the stencil test in the stencil framebuffer attachment.

uint32_t reference#

Integer reference value that is used in the unsigned stencil comparison.

CompareOp compareOp#

Comparison operator used in the stencil test.

SwizzleChannels#

Struct Documentation#

struct SwizzleChannels#

The SwizzleChannels struct.

Public Functions

inline SwizzleChannels()#

SwizzleChannels. Default: All channels are set to identity.

inline SwizzleChannels(Swizzle r, Swizzle g, Swizzle b, Swizzle a)#

SwizzleChannels.

Parameters
  • r – Swizzle R channel

  • g – Swizzle G channel

  • b – Swizzle B channel

  • a – Swizzle A channel

Public Members

Swizzle r#

Swizzle R channel.

Swizzle g#

Swizzle G channel.

Swizzle b#

Swizzle B channel.

Swizzle a#

Swizzle A channel.

TextureHeader#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct TextureHeader#

A class mirroring the PVR Texture container format header, and which can in general represent any Texture asset. Contains accessors functions to facilitate using the Texture data in application code. /summary>

Subclassed by pvr::Texture

Public Types

enum Constants#

This header stores everything that you would ever need to load (but not necessarily use) a texture’s data accurately, but no more. Data that is provided but is not needed to read the data is stored in the Metadata section (See TextureHeaderWithMetadata). Correct use of the texture may rely on meta data, but accurate data loading can be done through the standard header alone.

< Contains constants used by the header

Values:

enumerator PVRv3#

PVR format v3 identifier.

enumerator PVRv3Reversed#

PVR format v3 reversed identifier.

enumerator CompressedFlag#

Compressed format flag.

enumerator PremultipliedFlag#

Premultiplied flag.

enumerator SizeOfHeader#

The total size of the header in bytes.

Public Functions

TextureHeader()#

Default constructor for a TextureHeader. Returns an empty header.

TextureHeader(uint32_t numMetaData, TextureMetaData *metaData)#

Construct this from file header and meta data.

Parameters
  • fileHeader – File header to construct from

  • numMetaData – Number of meta data in the array

  • metaData – Array of meta data

TextureHeader(PixelFormat pixelFormat, uint32_t width, uint32_t height, uint32_t depth = 1, uint32_t numMipMaps = 1, ColorSpace colorSpace = ColorSpace::lRGB, VariableType channelType = VariableType::UnsignedByteNorm, uint32_t numSurfaces = 1, uint32_t numFaces = 1, uint32_t flags = 0, TextureMetaData *metaData = NULL, uint32_t metaDataSize = 0, uint32_t numPlanes = 1)#

Constructor.

Parameters
  • pixelFormat – Pixel format of the texture

  • widthTexture width

  • heightTexture height

  • depthTexture depth

  • numMipMaps – Number of mipmap in the texture

  • colorSpaceTexture color space (e.g sRGB, lRGB)

  • channelTypeTexture channel type

  • numSurfaces – Number of surfaces the texture has

  • numFaces – Number of faces the texture has

  • flags – Additional provided flags

  • metaDataTexture meta data

  • metaDataSizeTexture meta data size

inline PixelFormat getPixelFormat() const#

Gets the pixel type ID of the texture.

Returns

Return a 64-bit pixel type ID.

uint32_t getBitsPerPixel() const#

Gets the bits per pixel of the texture format.

Returns

Return number of bits per pixel

void getMinDimensionsForFormat(uint32_t &minX, uint32_t &minY, uint32_t &minZ) const#

Get the minimum dimensions that the texture format of this header can be.

Parameters
  • minX – Minimum width of the texture format.

  • minY – Minimum height of the texture format.

  • minZ – Minimum depth of the texture format.

inline ColorSpace getColorSpace() const#

Get the color space of the texture.

Returns

Return the ColorSpace enum representing color space.

inline VariableType getChannelType() const#

Get the channel type that the texture’s data is stored in.

Returns

Return the enum representing the type of the texture.

inline uint32_t getWidth(uint32_t uiMipMapLevel = 0) const#

Gets the width of the user specified MIP-Map level for the texture.

Parameters

uiMipMapLevel – MIP level that user is interested in.

Returns

Return the width of the specified MIP-Map level.

TextureMetaData::AxisOrientation getOrientation(TextureMetaData::Axis axis) const#

Gets the data orientation for this texture.

Parameters

axis – The axis to examine.

Returns

Return the orientation of the axis.

inline uint32_t getHeight(uint32_t uiMipMapLevel = 0) const#

Gets the height of the user specified MIP-Map level for the texture.

Parameters

uiMipMapLevel – MIP level that user is interested in.

Returns

Return the Height of the specified MIP-Map level.

inline uint32_t getDepth(uint32_t mipLevel = 0) const#

Gets the depth of the user specified MIP-Map level for the texture.

Parameters

mipLevel – MIP level that user is interested in.

Returns

Return the depth of the specified MIP-Map level.

inline uint32_t getTextureSize(int32_t mipMapLevel = pvrTextureAllMipMaps, bool allSurfaces = true, bool allFaces = true, bool allPlanes = true, uint32_t planeIndex = 0) const#

Gets the size in PIXELS of the texture, given various input parameters.

User can retrieve the total size of either all surfaces or a single surface, all faces or a single face and all MIP-Maps or a single specified MIP level. All of these

Parameters
  • mipMapLevel – Specifies a MIP level to check, ‘c_pvrTextureAllMIPMapLevels’ can be passed to Get the size of all MIP levels.

  • allSurfaces – The Size of all surfaces is calculated if true, only a single surface if false. /param>

  • allFaces – The Size of all faces is calculated if true, only a single face if false.

Returns

Return the size in PIXELS of the specified texture area.

uint32_t getDataSize(int32_t mipLevel = pvrTextureAllMipMaps, bool allSurfaces = true, bool allFaces = true, bool allPlanes = true, uint32_t planeIndex = 0) const#

Gets the size in BYTES of the texture, given various input parameters.

User can retrieve the size of either all surfaces or a single surface, all faces or a single face and all MIP-Maps or a single specified MIP level.

Parameters
  • mipLevel – Specifies a mip level to check, ‘c_pvrTextureAllMIPMapLevels’ can be passed to Get the size of all MIP levels.

  • allSurfaces – The Size of all surfaces is calculated if true, only a single surface if false. /param>

  • allFaces – The Size of all faces is calculated if true, only a single face if false.

  • allPlanes – The Size of all planes is calculated if true, only a single plane if false.

Returns

Return the size in BYTES of the specified texture area.

ptrdiff_t getDataOffset(uint32_t mipMapLevel = 0, uint32_t arrayMember = 0, uint32_t face = 0, uint32_t plane = 0) const#

Get a offset in the data.

Parameters
  • mipMapLevel – The mip map level of the offset

  • arrayMember – The array index of the offset

  • face – The face of the offset

Returns

Return data offset

inline uint32_t getNumArrayMembers() const#

Gets the number of array members stored in this texture.

Returns

Return the number of array members in this texture.

inline const std::map<uint32_t, std::map<uint32_t, TextureMetaData>> *getMetaDataMap() const#

Get a pointer directly to the Meta Data Map, to allow users to read out data.

Returns

Return a direct pointer to the MetaData map.

inline uint32_t getNumMipMapLevels() const#

Gets the number of MIP-Map levels stored in this texture.

Returns

Return the number of MIP-Map levels in this texture.

inline uint32_t getNumFaces() const#

Gets the number of faces stored in this texture.

Returns

Return the number of faces in this texture.

inline uint32_t getNumPlanes() const#

Gets the number of planes stored in this texture.

Returns

Return the number of planes in this texture.

const std::string getCubeMapOrder() const#

Gets the cube map face order.

Returned std::string will be in the form “ZzXxYy” with capitals representing positive and small letters representing negative. I.e. Z=Z-Positive, z=Z-Negative.

Returns

Returns cube map order.

inline bool isFileCompressed() const#

Returns whether or not the texture is compressed using PVRTexLib’s FILE compression - this is independent of any texture compression.

Returns

Return true if it is file compressed.

inline bool isPreMultiplied() const#

Check whether or not the texture’s color has been pre-multiplied by the alpha values.

Returns

Return true if texture is premultiplied.

inline uint32_t getMetaDataSize() const#

Get the total size of the meta data stored in the header. This includes the size of all information stored in all CPVRMetaDataBlocks.

Returns

Return the size, in bytes, of the meta data stored in the header.

bool getDirect3DFormat(uint32_t &outD3dFormat) const#

Gets the Direct3D equivalent format enumeration for this texture.

Parameters

outD3dFormat – Returned d3d format

Returns

Return true on success, returns false if it cannot find a suitable type

bool getDirectXGIFormat(uint32_t &outDxgiFormat, bool &notAlpha) const#

Gets the DirectXGI equivalent format enumeration for this texture.

Parameters
  • notAlpha – Return whether the outDxgiFormat is has alpha or not.

  • outDxgiFormat – Returned dxgi format

Returns

Return true on success, returns false if it cannot find a suitable type

inline void setPixelFormat(PixelFormat uPixelFormat)#

Sets the pixel format for this texture.

Parameters

uPixelFormat – The format of the pixel.

inline void setColorSpace(ColorSpace newColorSpace)#

Sets the color space for this texture. Default is lRGB.

Parameters

colorSpace – A color space of the texture.

inline void setChannelType(VariableType newChannelType)#

Sets the channel type of this texture.

Parameters

channelTypeTexture’s channel type

void setBumpMap(float bumpScale, std::string bumpOrder)#

Sets a texture’s bump map data.

For bumpOrder Not all values need to be present. Denotes channel order: x,y,z refer to the corresponding axes, h indicates presence of the original height map. It is possible to have only some of these values rather than all. For example if ‘h’ is present alone it will be considered a height map. The values should be presented in RGBA order, regardless of the texture format, so a zyxh order in a bgra texture should still be passed as ‘xyzh’. Capitals are allowed. Any character stored here that is not one of x,y,z,h or a NULL character will be ignored when PVRTexLib reads the data, but will be preserved. This is useful if you wish to define a custom data channel for instance. In these instances PVRTexLib will assume it is simply color data.

Parameters
  • bumpScale – Floating point “height” value to scale the bump map.

  • bumpOrder – Up to 4 character std::string, with values x,y,z,h in some combination.

bool isBumpMap() const#

Check if this texture is bumpmap.

Returns

Return true if the texture is bumpmap

inline void setWidth(uint32_t newWidth)#

Sets the texture width.

Parameters

newWidth – The new width.

inline void setHeight(uint32_t newHeight)#

Sets the texture height.

Parameters

newHeight – The new height.

inline void setDepth(uint32_t newDepth)#

Sets the texture depth.

Parameters

newDepth – The new depth.

inline void setNumArrayMembers(uint32_t numNewMembers)#

Sets the number of arrays in this texture.

Parameters

numNewMembers – The new number of members in this array.

inline void setNumMipMapLevels(uint32_t numNewMipMapLevels)#

Sets the number of MIP-Map levels in this texture.

Parameters

numNewMipMapLevels – New number of MIP-Map levels.

inline void setNumFaces(uint32_t numNewFaces)#

Sets the number of faces stored in this texture.

Parameters

numNewFaces – New number of faces for this texture.

inline void setNumPlanes(uint32_t numNewPlanes)#

Sets the number of planes stored in this texture.

Parameters

numNewPlanes – New number of planes for this texture.

void setOrientation(TextureMetaData::AxisOrientation axisOrientation)#

Sets the data orientation for a given axis in this texture.

Parameters

axisOrientation – Specifying axis and orientation.

void setCubeMapOrder(std::string cubeMapOrder)#

Sets a texture’s bump map data.

for cubmapOrder Not all values need to be present. Denotes face order: Capitals refer to positive axis positions and small letters refer to negative axis positions. E.g. x=X-Negative, X=X-Positive. It is possible to have only some of these values rather than all, as long as they are NULL terminated. NB: Values past the 6th character are not read.

Parameters

cubeMapOrder – Up to 6 character std::string, with values x,X,y,Y,z,Z in some combination.

inline void setIsFileCompressed(bool isFileCompressed)#

Sets whether or not the texture is compressed using PVRTexLib’s FILE compression - this is independent of any texture compression. Currently unsupported.

Parameters

isFileCompressed – Sets file compression to true/false.

inline void setIsPreMultiplied(bool isPreMultiplied)#

Sets whether or not the texture’s color has been pre-multiplied by the alpha values.

Parameters

isPreMultiplied – Sets if texture is premultiplied.

void addMetaData(const TextureMetaData &metaData)#

Adds an arbitrary piece of meta data.

Parameters

metaData – Meta data block to be added.

Public Members

uint32_t flags#

Various format flags.

PixelFormat pixelFormat#

The pixel format, 8cc value storing the 4 channel identifiers and their respective sizes.

ColorSpace colorSpace#

The Color Space of the texture, currently either linear RGB or sRGB.

VariableType channelType#

Variable type that the channel is stored in. Supports signed/unsigned int/short/char/float.

uint32_t height#

Height of the texture.

uint32_t width#

Width of the texture.

uint32_t depth#

Depth of the texture. (Z-slices)

uint32_t numSurfaces#

Number of members in a Texture Array.

uint32_t numFaces#

Number of faces in a Cube Map. Maybe be a value other than 6.

uint32_t numMipMaps#

Number of MIP Maps in the texture - NB: Includes top level.

uint32_t numPlanes#

Number of planes in the texture - NB: Includes top level.

uint32_t metaDataSize#

Size of the accompanying meta data.

std::map<uint32_t, std::map<uint32_t, TextureMetaData>> _metaDataMap#

Map of all the meta data stored for a texture.

TypedMem#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct TypedMem : public pvr::FreeValueView#

Represents Free Value View that is backed by a (usually small) dynamically allocated block.

Public Functions

inline TypedMem()#

Constructor.

inline ~TypedMem()#

Destructor. Frees any allocated memory.

inline void assign(const TypedMem &rhs)#

Copy constructor from another TypedMem.

Parameters

rhs – The object to copy from

inline const TypedMem &operator=(const TypedMem &rhs) const#

Copy assignment from another TypedMem.

Parameters

rhs – The object to copy from

Returns

This object

inline TypedMem(const TypedMem &rhs)#

Copy assignment from another TypedMem.

Parameters

rhs – The object to copy from

Returns

This object

inline uint64_t totalSize() const#

Return the size of this value in bytes.

Returns

The size of this value in bytes

inline void shrink(uint32_t arrayElements)#

Set this TypedMen to the specified number of items, reallocating as needed. Use this method instead of clear() if you actually need to physically free the memory.

Parameters

arrayElements – Number of elemets

inline void clear()#

Empty this object. Does NOT free the memory.

inline void allocate(GpuDatatypes dataType, uint32_t arrayElements = 1)#

Allocate the TypedMem to contain the specified type and number of items. Grows only, does not shrink memory.

Parameters
  • dataType – The type of the data. Use “none” for raw bytes

  • arrayElements – The number of array elements.

template<typename Type_>
inline void setValue(const Type_ &rawvalue)#

Set this object to contain the specified item, allocating as needed. Sets the type to the type of rawvalue, and array elements to 1.

Parameters

rawvalue – The value to set

template<typename Type_>
inline void setValue(const Type_ &rawvalue, uint32_t arrayIndex)#

Before calling this function, allocate the required number of items of the type you need, as this function does NOT allocate Sets this object to contain the specified item at the specified index. Does not allocate, so if the type is wrong or the array index is wrong, the behaviour is undefined.

Parameters
  • rawvalue – The value to set

  • arrayIndex – The index where to set the value

template<typename Type_>
inline void setValues(const Type_ *rawvalues, uint32_t numElements, uint32_t startArrayIndex = 0)#

Before calling this function, allocate the required number of items of the type you need, as this function does NOT allocate Sets the memory this object to contain the specified item at the specified index. Does not allocate, so if the type is wrong or the array index is wrong, the behaviour is undefined.

Parameters
  • rawvalues – The values to set

  • numElements – The number of elmeents to set

  • startArrayIndex – The array index at which to start setting values for

inline void setValue(const char *c_string_value)#

Sets the value from a null-terminated c-style string. Allocates as necessary.

Parameters

c_string_value – A null-terminated c-string

inline void setValue(const std::string &rawvalue)#

Sets the value from a c++ string. Allocates as necessary.

Parameters

rawvalue – A c++ string

VertexAttributeLayout#

Struct Documentation#

struct VertexAttributeLayout#

This class contains all the information of a Vertex Attribute’s layout inside a block of memory, typically a Vertex Buffer Object. This informations is normally the DataType of the attribute, the Offset (from the beginning of the array) and the width (how many values of type DataType form an attribute).

Public Functions

inline VertexAttributeLayout()#

VertexAttributeLayout.

inline VertexAttributeLayout(DataType dataType, uint8_t width, uint16_t offset)#

VertexAttributeLayout.

Parameters
  • dataType

  • width

  • offset

Public Members

DataType dataType#

Type of data of the vertex data.

uint16_t offset#

Offset, in bytes, of this vertex attribute.

uint8_t width#

Number of values per vertex.

GenericOffset2D#

Struct Documentation#

template<typename>
struct GenericOffset2D#