PVRCore Functions#

glm::to_string#

Function Documentation#

template<glm::length_t L, typename T, glm::qualifier Q = glm::packed_highp>
inline std::string glm::to_string(const glm::vec<L, T, Q> &vec)#

glm::to_string#

Function Documentation#

template<glm::length_t lC, glm::length_t lR, typename T, glm::qualifier Q = glm::packed_highp>
inline std::string glm::to_string(const glm::mat<lC, lR, T, Q> &mat)#

pvr::operator&#

Function Documentation#

inline ColorChannelFlags pvr::operator&(ColorChannelFlags lhs, ColorChannelFlags rhs)#

pvr::imageViewTypeToImageBaseType#

Function Documentation#

inline ImageType pvr::imageViewTypeToImageBaseType(ImageViewType viewtype)#

Map an ImageViewType (2dCube etc) to its base type (1d/2d/3d)

Parameters

viewtype – The ImageViewType

Returns

The base type

pvr::operator&=#

Function Documentation#

inline void pvr::operator&=(BufferUsageFlags &lhs, BufferUsageFlags rhs)#

pvr::hash32_bytes#

Function Documentation#

inline uint32_t pvr::hash32_bytes(const void *bytes, size_t count)#

Function object hashing a number of bytes into a 32 bit unsigned Integer.

Parameters
  • bytes – Pointer to a block of memory.

  • count – Number of bytes to hash.

Returns

The hash of the value.

pvr::to_string#

Function Documentation#

inline std::string pvr::to_string(VariableType variableType)#

pvr::growFloat#

Function Documentation#

inline float pvr::growFloat(const uint32_t &value, const uint8_t &mantissaBits, const uint8_t &exponentBits, const uint8_t &exponentBias, const bool hasSign)#

Produces a floating point value based on the uint32_t value, the mantissa bits and exponent bits.

Parameters
  • value – The uint32_t value

  • mantissaBits – The mantissa bits

  • exponentBits – The exponent bits

  • exponentBias – The exponent bias

  • hasSign – Specifies whether the float has a sign bit

Returns

The resulting floating point value

pvr::operator&#

Function Documentation#

inline BufferUsageFlags pvr::operator&(BufferUsageFlags lhs, BufferUsageFlags rhs)#

pvr::writeTGA#

Function Documentation#

inline void pvr::writeTGA(const char *filename, uint32_t w, uint32_t h, const unsigned char *imageData, const unsigned char stride, uint32_t pixelReplicate = 1)#

Write out TGA data from an image.

Parameters
  • filename – Filename for which a filestream will be created to write the TGA into

  • w – The width of the image

  • h – The height of the image

  • imageData – Pointer to the raw image data

  • stride – Size in bytes of each pixel. (Equal to the number of channels)

  • pixelReplicate – Upscale factor.

Returns

True if successfuly completed, otherwise False. (log error on false)

pvr::getSelfAlignedSize#

Function Documentation#

inline uint32_t pvr::getSelfAlignedSize(GpuDatatypes type)#

Returns “how many bytes will an object of this type take”, if not an array.

Parameters

type – The datatype to test

Returns

The size of this type, aligned to its own alignment restrictions

pvr::operator|#

Function Documentation#

inline ColorChannelFlags pvr::operator|(ColorChannelFlags lhs, ColorChannelFlags rhs)#

pvr::dataTypeIsNormalised#

Function Documentation#

inline bool pvr::dataTypeIsNormalised(DataType type)#

Return if the format is Normalized (represents a range between 0..1 for unsigned types or between -1..1 for signed types)

A Normalised format is a value that is stored as an Integer, but that actually represents a value from 0..1 or -1..1 instead of the numeric value of the Integer. For example, for a normalised unsigned char value, the value 0 represents 0.0, the value 127 represents 0.5 and the value 255 represents 1.0.

Parameters

type – The format to test.

Returns

True if the format is Normalised.

pvr::numDataTypeComponents#

Function Documentation#

inline uint32_t pvr::numDataTypeComponents(DataType type)#

Return the number of components in a datatype.

Parameters

type – The datatype

Returns

The number of components (e.g. float is 1, vec3 is 3)

pvr::operator&#

Function Documentation#

inline ImageAspectFlags pvr::operator&(ImageAspectFlags lhs, ImageAspectFlags rhs)#

Operator&.

Parameters
  • lhs – The right hand side of the operator

  • rhs – The right hand side of the operator

Returns

A set of ImageAspectFlags after applying the operator&.

pvr::getVectorUnalignedSize#

Function Documentation#

inline uint32_t pvr::getVectorUnalignedSize(GpuDatatypes type)#

Get the cpu-packed size of each vector element a type (disregarding matrix columns if they exist)

Parameters

type – The datatype to test

Returns

The size that a single column of type would take on the CPU

pvr::align#

Function Documentation#

template<typename t1, typename t2>
inline t1 pvr::align(t1 numberToAlign, t2 alignment)#

Aligns a given number based on the given alignment.

Parameters
  • numberToAlign – A number ot align based alignment

  • alignment – The value to which the numberToAlign will be aligned

Returns

An aligned value

pvr::writeTGA#

Function Documentation#

inline void pvr::writeTGA(pvr::Stream &&file, uint32_t w, uint32_t h, const unsigned char *imageData, const unsigned char stride, uint32_t pixelReplicate = 1)#

Write out TGA data from an image.

Parameters
  • filenameStream to write the TGA into

  • w – The width of the image

  • h – The height of the image

  • imageData – Pointer to the raw image data

  • stride – Size in bytes of each pixel. (Equal to the number of channels)

  • pixelReplicate – Upscale factor.

Returns

True if successfuly completed, otherwise False. (log error on false)

pvr::indexTypeSizeInBytes#

Function Documentation#

inline uint32_t pvr::indexTypeSizeInBytes(const IndexType type)#

Return the Size of an IndexType in bytes.

Parameters

type – The Index type

Returns

The number of bytes in an index type

pvr::getAlignment#

Function Documentation#

inline uint32_t pvr::getAlignment(GpuDatatypes type)#

Get required alignment of this type as demanded by std140 rules.

Parameters

type – The datatype to test

Returns

The required alignment of the type based on std140 (see the GLSL spec)

pvr::isVariableTypeNormalized#

Function Documentation#

inline bool pvr::isVariableTypeNormalized(VariableType item)#

Check if a variable type is a Normalizedtype.

Parameters

item – The variable to check

Returns

True if item is a normalized type (nomralized short, normalized integer etc)

pvr::writeTGAFromPlanar#

Function Documentation#

inline void pvr::writeTGAFromPlanar(pvr::Stream &&stream, uint32_t w, uint32_t h, const unsigned char *imageDataR, const unsigned char *imageDataG, const unsigned char *imageDataB, const uint32_t stride, uint32_t pixelReplicate = 1)#

pvr::operator|=#

Function Documentation#

inline void pvr::operator|=(BufferUsageFlags &lhs, BufferUsageFlags rhs)#

pvr::to_string#

Function Documentation#

inline std::string pvr::to_string(CompressedPixelFormat format)#

pvr::dataTypeSize#

Function Documentation#

inline uint32_t pvr::dataTypeSize(DataType type)#

Return the Size of a DataType.

Parameters

type – The Data type

Returns

The size of the Datatype in bytes.

pvr::getVectorSelfAlignedSize#

Function Documentation#

inline uint32_t pvr::getVectorSelfAlignedSize(GpuDatatypes type)#

Get the size of a type, including padding, assuming the next item is of the same type.

Parameters

type – The datatype to test

Returns

The size plus padding of this type

pvr::toDataType#

Function Documentation#

inline DataType pvr::toDataType(GpuDatatypes type)#

Get the Cpu Datatype type refers to (i.e. which CPU datatype must you load in the data you upload to the GPU to correctly upload the same value in the shader).

Parameters

type – The type to convert

Returns

A CPU type that has the same bit representation as one scalar element of type (i.e. mat4x4 returns “float”)

pvr::getTextureFormatFromFilename#

Function Documentation#

TextureFileFormat pvr::getTextureFormatFromFilename(const char *assetname)#

Infer the texture format from a filename.

Parameters

assetname – The name of the asset, containing the extension.

Returns

The TextureFileFormat if understood, otherwise TextureFileFormat::Unknown.

pvr::to_string#

Function Documentation#

inline std::string pvr::to_string(ShaderType shaderType)#

Converts a pvr::ShaderType to string.

Parameters

shaderType – The type of the shader

Returns

A stringified version of pvr::ShaderType

pvr::getOffsetAfter#

Function Documentation#

inline uint32_t pvr::getOffsetAfter(GpuDatatypes type, uint64_t previousTotalSize)#

Aligns an address/offset with the alignment of a type &#8212; equivalently, assuming you want to place a type after a known offset (i.e. calculating the offset of an item inside a struct having already calculated its previous element) (i.e. aligning a vec4 after an item that ends at 30 bytes returns 32 bytes…)

Parameters
  • type – The datatype to test

  • previousTotalSize – The address/offset to align for that type

Returns

previousTotalSize aligned to the requirements of type

pvr::getNumMatrixColumns#

Function Documentation#

inline uint32_t pvr::getNumMatrixColumns(GpuDatatypes type)#

Get the number of colums (1..4) of the type.

Parameters

type – The datatype to test

Returns

The number of matrix colums (1..4) of the type. 1 implies not a matrix

pvr::operator&=#

Function Documentation#

inline void pvr::operator&=(ColorChannelFlags &lhs, ColorChannelFlags rhs)#

pvr::getCpuPackedSize#

Function Documentation#

inline uint64_t pvr::getCpuPackedSize(GpuDatatypes type, uint32_t arrayElements = 1)#

Get the size of n array members of a type, packed in CPU.

Parameters
  • type – The datatype to test

  • arrayElements – The number of array elements

Returns

The base size of the type multiplied by arrayElements

pvr::getTotalSizeAfter#

Function Documentation#

inline uint64_t pvr::getTotalSizeAfter(GpuDatatypes type, uint32_t arrayElements, uint64_t previousTotalSize)#

Returns the new size of a hypothetical struct whose old size was previousTotalSize, and to which “arrayElement” new items of type “type” are added.

Parameters
  • type – The datatype to add

  • arrayElements – The number of items of type type to add

  • previousTotalSize – The address/offset to align for that type

Returns

The new size

pvr::PVRTDecompressETC#

Function Documentation#

uint32_t pvr::PVRTDecompressETC(const void *srcData, uint32_t xDim, uint32_t yDim, void *dstData, uint32_t mode)#

Decompresses ETC to RGBA 8888.

Parameters
  • srcData – The ETC texture data to decompress

  • xDim – X dimension of the texture

  • yDim – Y dimension of the texture

  • dstData – The decompressed texture data

  • mode – The format of the data

Returns

Return The number of bytes of ETC data decompressed

pvr::toString#

Function Documentation#

inline const char *pvr::toString(GpuDatatypes type)#

Get a string with the glsl variable name of a type.

Parameters

type – The datatype to test

Returns

A c-style string with the glsl variable keyword of type

pvr::writeTGA#

Function Documentation#

inline void pvr::writeTGA(pvr::Stream &file, uint32_t w, uint32_t h, const unsigned char *imageData, const uint32_t stride, uint32_t pixelReplicate = 1)#

Write out TGA data from an image.

Parameters
  • filenameStream to write the TGA into

  • w – The width of the image

  • h – The height of the image

  • imageData – Pointer to the raw image data

  • stride – Size in bytes of each pixel. (Equal to the number of channels)

  • pixelReplicate – Upscale factor.

Returns

True if successfuly completed, otherwise False. (log error on false)

pvr::apiName#

Function Documentation#

inline const char *pvr::apiName(Api api)#

Get the api name std::string of the given Enumeration.

Parameters

api – The api

Returns

Api name std::string

pvr::getSelfAlignedArraySize#

Function Documentation#

inline uint32_t pvr::getSelfAlignedArraySize(GpuDatatypes type)#

Returns “how many bytes will an object of this type take”, if it is an array member (arrays have potentially stricter requirements).

Parameters

type – The datatype to test

Returns

The size of this type, aligned to max array alignment restrictions

pvr::randomrange#

Function Documentation#

inline float pvr::randomrange(float min, float max)#

Get a random Number between min and max.

Parameters
  • min – Minimum number (inclusive)

  • max – Maximum number (inclusive)

Returns

Random number

pvr::getSize#

Function Documentation#

inline uint64_t pvr::getSize(GpuDatatypes type, uint32_t arrayElements = 1)#

Returns how many bytes an array of n objects of this type take, but arrayElements = 1 is NOT considered an array (is aligned as a single object, NOT an array of 1)

Parameters
  • type – The datatype to test

  • arrayElements – The number of array elements. 1 is NOT considered an array.

Returns

The size of X elements takes

pvr::mergeDatatypesSmaller#

Function Documentation#

inline GpuDatatypes pvr::mergeDatatypesSmaller(GpuDatatypes type1, GpuDatatypes type2)#

Returns a datatype that is smaller or equal to both of two types: 1) Has the most permissive base type (float>int) 2) Has the smaller of the two vector widths 3) Has the least of the two matrix colums heights.

Parameters
  • type1 – The first type

  • type2 – The second type

Returns

A type that will truncate everything the two types don’t share

pvr::getNumVecElements#

Function Documentation#

inline uint32_t pvr::getNumVecElements(GpuDatatypes type)#

Get the number of vector elements (i.e. Rows) of a type. (e.g. vec2=>2)

Parameters

type – The datatype to test

Returns

The number of vector elements.

pvr::operator|=#

Function Documentation#

inline void pvr::operator|=(ColorChannelFlags &lhs, ColorChannelFlags rhs)#

pvr::operator|#

Function Documentation#

inline BufferUsageFlags pvr::operator|(BufferUsageFlags lhs, BufferUsageFlags rhs)#

pvr::unpackSamplerFilter#

Function Documentation#

inline void pvr::unpackSamplerFilter(PackedSamplerFilter packed, Filter &mini, Filter &magni, SamplerMipmapMode &mip)#

Unpack a 8 bit PackedSamplerFilter value into a minification, magnification and mip filter mode.

Parameters
  • packed – The packed sampler filter to unpack

  • mini – The filtering mode that should be used for minification

  • magni – The filtering mode that should be used for magnification

  • mip – The filtering mode that should be used for mipmapping

Returns

An 8 bit value representing the described sampler

pvr::textureLoad#

Function Documentation#

inline Texture pvr::textureLoad(const Stream &textureStream, TextureFileFormat type)#

Load a texture from binary data. Synchronous.

Parameters
  • textureStream – A stream from which to load the binary data

  • type – The type of the texture. Several supported formats.

Returns

Returns a successfully created pvr::Texture object otherwise will throw

pvr::operator&=#

Function Documentation#

inline void pvr::operator&=(ImageAspectFlags &lhs, ImageAspectFlags rhs)#

Operator&=.

Parameters
  • lhs – The right hand side of the operator

  • rhs – The right hand side of the operator

Returns

A set of ImageAspectFlags after applying the operator&=.

pvr::getResultCodeString#

Function Documentation#

inline const char *pvr::getResultCodeString(Result result)#

Use this function to convert a Result into a std::string that is suitable for outputting.

Parameters

result – The result

Returns

A std::string suitable for writing out that represents this Result

pvr::to_string#

Function Documentation#

inline std::string pvr::to_string(ColorSpace colorspace)#

pvr::operator>>#

Function Documentation#

inline GpuDatatypes pvr::operator>>(GpuDatatypes lhs, GpuDatatypesHelper::Bits rhs)#

Bitwise operator RIGHT SHIFT. Typical semantics. Allows RIGHT SHIFT of GpuDatatypes by Bits.

Parameters
  • lhs – Left hand side

  • rhs – Right hand side

Returns

lhs RIGHT SHIFT rhs

pvr::apiCode#

Function Documentation#

inline const char *pvr::apiCode(Api api)#

Get a string of the specific api enum.

Parameters

api – The api

Returns

Api code

pvr::writeTGAFromPlanar#

Function Documentation#

inline void pvr::writeTGAFromPlanar(const char *filename, uint32_t w, uint32_t h, const unsigned char *imageDataR, const unsigned char *imageDataG, const unsigned char *imageDataB, const uint32_t stride, uint32_t pixelReplicate = 1)#

Write out TGA data from an image.

Parameters
  • filename – C-style string with the filename to write the TGA.

  • w – The width of the image

  • h – The height of the image

  • imageDataR – Pointer to the RED channel image data

  • imageDataG – Pointer to the GREEN channel image data

  • imageDataB – Pointer to the BLUE channel image data

  • stride – Size in bytes of each pixel

  • pixelReplicate – Upscale factor.

Returns

True if successfuly completed, otherwise False. (log error on false)

pvr::packSamplerFilter#

Function Documentation#

inline PackedSamplerFilter pvr::packSamplerFilter(Filter mini, Filter magni, SamplerMipmapMode mip)#

Pack a minification filter, a magnification filter and a mipmap filter into an 8 bit value.

Parameters
  • mini – The filtering mode that should be used for minification

  • magni – The filtering mode that should be used for magnification

  • mip – The filtering mode that should be used for mipmapping

Returns

An 8 bit value representing the described sampler

pvr::getBaseType#

Function Documentation#

inline GpuDatatypesHelper::BaseType pvr::getBaseType(GpuDatatypes type)#

Get the underlying element of a type (integer or float)

Parameters

type – The datatype to test

Returns

A BaseType enum (integer or float)

pvr::mergeDatatypesBigger#

Function Documentation#

inline GpuDatatypes pvr::mergeDatatypesBigger(GpuDatatypes type1, GpuDatatypes type2)#

Returns a datatype that is larger or equal to both of two types: 1) Has the most permissive base type (float>int) 2) Has the largest of the two vector widths 3) Has the most of the two matrix colums heights.

Parameters
  • type1 – The first type

  • type2 – The second type

Returns

A type that can fit either of type1 or type1

pvr::writeTGAFromPlanar#

Function Documentation#

inline void pvr::writeTGAFromPlanar(pvr::Stream &stream, uint32_t w, uint32_t h, const unsigned char *imageDataR, const unsigned char *imageDataG, const unsigned char *imageDataB, const uint32_t stride, uint32_t pixelReplicate = 1)#

Write out TGA data from an image.

Parameters
  • filenameStream to write the TGA into

  • w – The width of the image

  • h – The height of the image

  • imageDataR – Pointer to the RED channel image data

  • imageDataG – Pointer to the GREEN channel image data

  • imageDataB – Pointer to the BLUE channel image data

  • stride – Size in bytes of each pixel

  • pixelReplicate – Upscale factor.

Returns

True if successfuly completed, otherwise False. (log error on false)

pvr::operator&#

Function Documentation#

inline GpuDatatypes pvr::operator&(GpuDatatypes lhs, GpuDatatypesHelper::Bits rhs)#

Bitwise operator AND. Typical semantics. Allows AND between GpuDatatypes and Bits.

Parameters
  • lhs – Left hand side

  • rhs – Right hand side

Returns

lhs AND rhs

pvr::convertXYZToCubeUV#

Function Documentation#

inline void pvr::convertXYZToCubeUV(float x, float y, float z, CubeFace &face, float &u, float &v)#

Converts an x, y and z direction to a texture coordinate of a particular cubemap face.

Parameters
  • x – The x component of te direction.

  • y – The y component of te direction.

  • z – The z component of te direction.

  • face – The cubemap face enumeration retrieved using the x, y, z direction.

  • u – The u component of the texture coordinate retrieved.

  • v – The v component of the texture coordinate retrieved.

pvr::isVariableTypeSigned#

Function Documentation#

inline bool pvr::isVariableTypeSigned(VariableType item)#

Check if a variable type is a Signed type.

Parameters

item – The variable to check

Returns

True if item is a signed type (signed integer, signed float etc), otherwise false

pvr::operator|=#

Function Documentation#

inline void pvr::operator|=(ImageAspectFlags &lhs, ImageAspectFlags rhs)#

Operator|=.

Parameters
  • lhs – The right hand side of the operator

  • rhs – The right hand side of the operator

Returns

A set of ImageAspectFlags after applying the operator|=.

pvr::hash32_32#

Function Documentation#

template<typename T1_>
inline uint32_t pvr::hash32_32(const T1_ &t)#

Function object hashing to 32 bit values into a 32 bit unsigned Integer.

Parameters

t – The value to hash.

Template Parameters

T1_ – The type of the value to hash.

Returns

The hash of the value.

pvr::operator<<#

Function Documentation#

inline GpuDatatypes pvr::operator<<(GpuDatatypes lhs, GpuDatatypesHelper::Bits rhs)#

Bitwise operator LEFT SHIFT. Typical semantics. Allows LEFT SHIFT of GpuDatatypes by Bits.

Parameters
  • lhs – Left hand side

  • rhs – Right hand side

Returns

lhs LEFT SHIFT rhs

pvr::to_string#

Function Documentation#

inline std::string pvr::to_string(const PixelFormat &fmt)#

pvr::descriptorTypeToBufferUsage#

Function Documentation#

inline BufferUsageFlags pvr::descriptorTypeToBufferUsage(DescriptorType descType)#

Infer the BufferUsageFlags that are suitable for the typical use of an object.

Parameters

descType – A descriptor type

Returns

The typical usage flags for <paramref name=”descType/>

pvr::textureLoad#

Function Documentation#

inline Texture pvr::textureLoad(const Stream &textureStream)#

Load a texture from binary data. Synchronous.

Parameters

textureStream – A stream from which to load the binary data

Returns

True if successful, otherwise false

pvr::operator|#

Function Documentation#

inline ImageAspectFlags pvr::operator|(ImageAspectFlags lhs, ImageAspectFlags rhs)#

Operator|.

Parameters
  • lhs – The right hand side of the operator

  • rhs – The right hand side of the operator

Returns

A set of ImageAspectFlags after applying the operator|.

pvr::PVRTDecompressPVRTC#

Function Documentation#

uint32_t pvr::PVRTDecompressPVRTC(const void *compressedData, uint32_t do2bitMode, uint32_t xDim, uint32_t yDim, uint8_t *outResultImage)#

Decompresses PVRTC to RGBA 8888.

Parameters
  • compressedData – The PVRTC texture data to decompress

  • do2bitMode – Signifies whether the data is PVRTC2 or PVRTC4

  • xDim – X dimension of the texture

  • yDim – Y dimension of the texture

  • outResultImage – The decompressed texture data

Returns

Return the amount of data that was decompressed.

pvr::isDescriptorTypeDynamic#

Function Documentation#

inline bool pvr::isDescriptorTypeDynamic(DescriptorType descType)#

Checks if a descriptor type is dynamic (a dynamic UBO or dynamic SSBO)

Parameters

descType – A descriptor type

Returns

True if descType is UniformBufferDynamic or StorageBufferDynamic, otherwise false

pvr::assetReaders::getPVRTypeFromXNBFormat#

Function Documentation#

VariableType pvr::assetReaders::getPVRTypeFromXNBFormat(uint32_t xnbFormat)#

pvr::assetReaders::getPVRFormatFromXNBFormat#

Function Documentation#

uint64_t pvr::assetReaders::getPVRFormatFromXNBFormat(uint32_t xnbFormat)#

pvr::assetReaders::readKTX#

Function Documentation#

Texture pvr::assetReaders::readKTX(const Stream &stream)#

pvr::assetReaders::readBMP#

Function Documentation#

Texture pvr::assetReaders::readBMP(const Stream &stream)#

Experimental BMP Texture reader.

pvr::assetReaders::readXNB#

Function Documentation#

Texture pvr::assetReaders::readXNB(const ::pvr::Stream &stream, int assetIndex = 0)#

Experimental XNB Texture reader.

pvr::assetReaders::isPVR#

Function Documentation#

bool pvr::assetReaders::isPVR(const Stream &assetStream)#

pvr::assetReaders::readTGA#

Function Documentation#

Texture pvr::assetReaders::readTGA(const Stream &str)#

pvr::assetReaders::readDDS#

Function Documentation#

Texture pvr::assetReaders::readDDS(const ::pvr::Stream &stream)#

Experimental DDS Texture reader.

pvr::assetReaders::isBMP#

Function Documentation#

bool pvr::assetReaders::isBMP(const Stream &stream)#

pvr::assetReaders::readPVR#

Function Documentation#

Texture pvr::assetReaders::readPVR(const Stream &stream)#

Creates pvr::Texture object from a Stream containing PVR texture data.

pvr::math::ndcToPixel#

Function Documentation#

inline int32_t pvr::math::ndcToPixel(float ndc, int32_t screenSize)#

Convert a normalized device coordinate (-1..1) to a number of pixels from the start (left or top)

Parameters
  • ndc – The normalised coordinate along the direction in question (same direction as screenSize)

  • screenSize – The size of the screen along the direction in question (same as ndc)

Returns

Pixel coordinates from normalized device coordinates

pvr::math::pixelToNdc#

Function Documentation#

inline float pvr::math::pixelToNdc(int32_t pixelCoord, int32_t screenSize)#

Convert a number of pixels (left or top) to a normalized device coordinate (-1..1)

Parameters
  • pixelCoord – The pixel coordinate (number of pixels) along the direction in question (same direction as screenSize)

  • screenSize – The size of the screen along the direction in question (same as pixelCoord)

Returns

Normalized device coordinates (number in the 0..1 range)

pvr::math::IntersectPlanes#

Function Documentation#

inline glm::vec3 pvr::math::IntersectPlanes(glm::vec4 p0, glm::vec4 p1, glm::vec4 p2)#

Retrieves the point at which 3 planes intersect.

Parameters
  • p0 – Plane 0

  • p1 – Plane 1

  • p2 – Plane 2

Returns

The point at which the 3 planes intersect

pvr::math::adjustOffsetsAndWeightsForLinearSampling#

Function Documentation#

inline void pvr::math::adjustOffsetsAndWeightsForLinearSampling(const size_t halfCoefficientsMinusOne, std::vector<double> &weights, std::vector<double> &offsets)#

Adjust a given set of Gaussian weights and offset to be “linearly samplable” meaning we can achieve the same Gaussian Blur using fewer texture samples using Linear Sampling than would be required if not using Linear Sampling when sampling using the offsets.

Parameters
  • halfCoefficientsMinusOne – The row of the Pascal to generate coefficients with the first row being the 0th.

  • weights – A vector containing the Gaussian weights for the given kernel size.

  • offsets – A vector containing the Gaussian offsets for the given kernel.

pvr::math::quadraticEaseIn#

Function Documentation#

inline float pvr::math::quadraticEaseIn(float start, float end, float factor)#

Performs quadratic interpolation between two points, beginning with a slow rate and speeding up.

Parameters
  • start – The starting point.

  • end – The end point

  • factor – Interpolation factor. At 0, returns start. At 1, returns end. Closer to 0, the rate of change is slower, closer to 1 faster.

Returns

The modified value to use, quadratically interpolated between start and end with factor factor.

pvr::math::aabbInFrustum#

Function Documentation#

inline bool pvr::math::aabbInFrustum(const AxisAlignedBox &box, const ViewingFrustum &frustum)#

Test if an AABB intersects or is inside a frustum.

Parameters
  • box – A box

  • frustum – A frustum

Returns

False if the AABB is completely outside the frustum, otherwise true

pvr::math::quadraticEaseOut#

Function Documentation#

inline float pvr::math::quadraticEaseOut(float start, float end, float factor)#

Performs quadratic interpolation between two points, beginning with a faster rate and slowing down.

0

Parameters
  • start – The starting point.

  • end – The end point

  • factor – Current LINEAR interpolation factor, from 0..1

Returns

For factor =0, returns start . For factor =1, returns end . Closer to 0, the rate of change is faster, closer to 1 slower.

pvr::math::distancePointToPlane#

Function Documentation#

inline float pvr::math::distancePointToPlane(const glm::vec3 &point, const glm::vec4 &plane)#

Calculate the signed (in regards to the plane’s normal) distance from a point to a plane.

Parameters
  • point – The point

  • plane – The plane, defined as a vector4, where (xyz: Normal, w: Distance from the origin)

Returns

The distance from the point to the plane (along the normal). Positive if on the side of the normal, otherwise false

pvr::math::pointOnSide#

Function Documentation#

inline bool pvr::math::pointOnSide(const glm::vec3 &point, const glm::vec4 &plane)#

Calculate if the point is in the positive half-space defined by the plane (i.e. if it is lying on the same side as the normal points.

Parameters
  • point – The point

  • plane – The plane, defined as a vector4, where (xyz: Normal, w: Distance from the origin)

Returns

True if the point is on the plane or on the same side as the normal, otherwise false

pvr::math::generatePascalTriangleRow#

Function Documentation#

inline uint64_t pvr::math::generatePascalTriangleRow(size_t row, std::vector<uint64_t> &pascalCoefficients)#

Generate the Pascal Triangle row for the given row and store and return its pascal triangle coefficinets along with the sum of the coefficients for the given row.

Parameters
  • row – The row of the Pascal to generate coefficients with the first row being the 0th.

  • pascalCoefficients – An empty vector capable of storing the pascal coefficients for the given row of the Pascal Triangle.

Returns

Returns the sum of the coefficients for the given row of the Pascal Triangle.

pvr::math::constructSRT#

Function Documentation#

inline glm::mat4 pvr::math::constructSRT(const glm::vec3 &scale, const glm::quat &rotate, const glm::vec3 &translation)#

Constructs a scale rotate translation matrix.

Parameters
  • scale – Scaling vector.

  • rotate – A quaternion handling the rotation.

  • translation – The translation vector.

Returns

The resulting SRT matrix.

pvr::math::generateGaussianKernelWeightsAndOffsets#

Function Documentation#

inline void pvr::math::generateGaussianKernelWeightsAndOffsets(uint32_t kernelSize, bool truncateCoefficients, bool useLinearSamplerOptimization, std::vector<double> &weights, std::vector<double> &offsets, float minimumAcceptableCoefficient = 0.0001f)#

Generates a set of Gaussian weights and offsets based on the given configuration values. This function makes use of the Pascal Triangle for calculating the Gaussian distribution. The Gaussian function is a distribution function of the normal distribution who’s discrete equivalent is the binomial distribution for which the Pascal Triangle models. The Pascal Triangle provides us with a convenient and efficient mechanism for calculating the Gaussian weights and offsets required. Our method of generating Gaussian weights and offsets was inspired by http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ .

Parameters
  • kernelSize – The size of the kernel for which to generate Gaussian Weights and Gaussian Offsets. The size of the kernel is used to select the starting row of the Pascal Triangle.

  • truncateCoefficients – Can be used in combination with “minimumAcceptableCoefficient” to ignore coefficients from the Pascal Triangle which are smaller than the given value and are therefore deemed to be negligible. If the starting row is found to have too few coefficients than are required for the kernel size then the next row of the Pascal Triangle will be scanned for a list of coefficients deemed to be non-negligible and so on.

  • useLinearSamplerOptimization – Specifies that the Gaussian Weights and Offsets returned will be modified prior to being returned so that they take advantage of Linear Texture Sampling which can provide a simple means of reducing the number of texture samples.

  • weights – The returned by reference list of Gaussian Weights calculated using the Pascal Triangle.

  • offsets – The returned by reference list of Gaussian Offsets calculated using the Pascal Triangle.

  • minimumAcceptableCoefficient – Only used when ignoreNegligibleCoefficients is true and specifies the minimum coefficient value which is deemed to be non-negligible and therefore can be used as one of the returned weights. If a row does not contain enough coefficients deemed to be non-negligible then the next row will be checked for values greater than the specified minimum acceptable coefficient. Take care when specifying larger values for the minimum acceptable coefficient along with larger kernel sizes as you can run out of available precision quite quickly.

Returns

Returns the sum of the coefficients for the given row of the Pascal Triangle.

pvr::math::perspectiveFov#

Function Documentation#

inline glm::mat4 pvr::math::perspectiveFov(Api api, float fovy, float width, float height, float near1, float far1, float rotate = .0f)#

Calculated a tilted perspective projection matrix.

Parameters
  • fovy – The field of vision in the y axis

  • width – The width of the viewport

  • height – The height of the viewport

  • near1 – The near clipping plane distance

  • far1 – The far clipping plane distance

  • rotate – Angle of tilt (rotation around the z axis), in radians

  • api – The graphics API for which this matrix will be created. It is used for things such as the Framebuffer coordinate conventions.

Returns

A projection matrix for the specified parameters, tilted by rotate

pvr::math::getFrustumPoints#

Function Documentation#

inline void pvr::math::getFrustumPoints(ViewingFrustum &frustum_out)#

Retrieve the points of a viewing frustum by intersecting planes.

Parameters

frustum_out – The viewing frustum

pvr::math::getPerpendicular#

Function Documentation#

template<typename Vec2>
Vec2 pvr::math::getPerpendicular(Vec2 const &aVector)#

Get a vector that is perpendicular to another vector.

Template Parameters

Vec2 – A vector with two components that can be accessed through .x and .y

Parameters

aVector – A vector

Returns

A vector that is perpendicular to aVector

pvr::math::intersectLinePlane#

Function Documentation#

template<typename genType>
bool pvr::math::intersectLinePlane(genType const &origin, genType const &dir, genType const &planeOrigin, genType const &planeNormal, typename genType::value_type &intersectionDistance, typename genType::value_type epsilon = std::numeric_limits<typename genType::value_type>::epsilon())#

Performs line -to - plane intersection.

Template Parameters

genType – A glm:: vector type. Otherwise, a type with the following operations defined: A typename member value_type (type of scalar), +/- (vector add/mul), / (divide by scalar), and a dot() function in either the global or glm:: namespace

Parameters
  • origin – The start point of the line

  • dir – The (positive) direction of the line

  • planeOrigin – Any point on the plane

  • planeNormal – The normal of the plane

  • intersectionDistance – Output parameter: If an intersection happens, this parameter will contain the signed distance from origin towards dir of the intersection point.

  • epsilon – For any comparison calculations, any value smaller than that will be considered zero (otherwise, if two numbers difference is smaller than this, they are considered equal)

Returns

True if the line and plane intersect, otherwise false

pvr::math::ortho#

Function Documentation#

inline glm::mat4 pvr::math::ortho(Api api, float left, float right, float bottom, float top, float rotate = 0.0f)#

Calculated an orthographic projection tilted projection matrix.

Parameters
  • left – The x coordinate of the left clipping plane

  • right – The x coordinate of the right clipping plane

  • bottom – The y coordinate of the bottom clipping plane

  • top – The y coordinate of the bottom clipping plane

  • rotate – Angle of tilt (rotation around the z axis), in radians

  • api – The graphics API for which this matrix will be created. It is used for things such as the Framebuffer coordinate conventions.

Returns

An orthographic projection matrix for the specified parameters, tilted by rotate

pvr::math::perspective#

Function Documentation#

inline glm::mat4 pvr::math::perspective(Api api, float fovy, float aspect, float near1, float far1, float rotate = .0f)#

Calculated a tilted perspective projection matrix.

Parameters
  • api – The graphics API for which this matrix will be created. It is used for the Framebuffer coordinate convention.

  • fovy – The field of vision in the y axis

  • aspect – The aspect of the viewport

  • near1 – The near clipping plane distance (trailing 1 to avoid win32 keyword)

  • far1 – The far clipping plane distance (trailing 1 to avoid win32 keyword)

  • rotate – Angle of tilt (rotation around the z axis), in radians

Returns

A projection matrix for the specified parameters, tilted by rotate

pvr::math::lcm#

Function Documentation#

template<typename T>
inline T pvr::math::lcm(T lhs, T rhs)#

Calculate the Least Common Multiple of two numbers (the smaller integer that is a factor of both numbers). Order is irrelevant. If either of the numbers is 0, will return 0.

Template Parameters

T – The type of the values. Must have equality, assignment multiplication and either modulo or a gcd function defined

Parameters
  • lhs – One of the input values

  • rhs – The other input values

Returns

The LCM. If the inputs don’t have any common factors (except 1), the LCM is equal to lhs * rhs. If either input is 0, returns 0.

pvr::math::getFrustumPlanes#

Function Documentation#

inline void pvr::math::getFrustumPlanes(pvr::Api api, const glm::mat4 &projection_from_world, ViewingFrustum &frustum_out)#

Retrieve the viewing frustum from a projection matrix.

Parameters
  • projection_from_world – The projection matrix

  • frustum_out – The viewing frustum

  • api – The Graphics API for which to get the planes. Used to infer and use the underlying Device coordinate system.

pvr::math::makePowerOfTwoLow#

Function Documentation#

inline int32_t pvr::math::makePowerOfTwoLow(int32_t iVal)#

Return the smallest power of two that is less than or equal to the provided value.

Parameters

iVal – An integer value.

Returns

The smallest PoT that is less or equal to iVal

pvr::math::lcm_with_max#

Function Documentation#

template<typename T>
inline T pvr::math::lcm_with_max(T lhs, T rhs)#

Calculate the Least Common Multiple of two numbers (the smaller integer that is a multiple of both numbers), but discards 0: If either number is 0, will return the other number.

Template Parameters

T – The type of the values. Must have equality, assignment multiplication and either modulo or a gcd function defined

Parameters
  • lhs – One of the input values

  • rhs – The other input values

Returns

The LCM. If the numbers don’t have any common factors (except 1), the LCM is equal to lhs * rhs. If either input is 0, returns the other

pvr::math::gcd#

Function Documentation#

template<typename T>
inline T pvr::math::gcd(T lhs, T rhs)#

Calculate the Greatest Common Divisor of two numbers (the larger number that, if used to divide either value, has a remainder of zero. Order is irrelevant.

Template Parameters

T – The type of the values. Must have equality, assignment and modulo defined

Parameters
  • lhs – One of the input values

  • rhs – The other input values

Returns

The GCD. If the numbers are “coprime” (have no common divisor exept 1), the GCD is 1.

pvr::math::makePowerOfTwoHigh#

Function Documentation#

inline int32_t pvr::math::makePowerOfTwoHigh(int32_t iVal)#

Return the smallest power of two that is greater than or equal to the provided value.

Parameters

iVal – An integer value.

Returns

The smallest PoT that is greater or equal to iVal

pvr::strings::ignoreWhitespace#

Function Documentation#

inline void pvr::strings::ignoreWhitespace(char **pszString)#

Skips any beginning space, tab or new-line characters, advancing the pointer to the first non-whitespace character.

Parameters

pszString – Pointer to a c-style string. Will be advanced to the first non-whitespace char (or the null terminator if no other characters exist)

pvr::strings::toLower#

Function Documentation#

inline std::string pvr::strings::toLower(const std::string &str)#

Transforms a std::string to lowercase.

Parameters

str – A std::string to transform.

Returns

A string otherwise equal to the param str, but transformed to lowercase

pvr::strings::createFormatted#

Function Documentation#

inline std::string pvr::strings::createFormatted(const char *const format, ...)#

Creates an std::string with a printf-like command.

Parameters
  • format – printf-style format std::string

  • ... – printf-style variable arguments

Returns

A string containing the output as if the params were passed through printf

pvr::strings::concatenateLinesUntil#

Function Documentation#

inline bool pvr::strings::concatenateLinesUntil(std::string &outStr, int &line, const std::vector<std::string> &lines, uint32_t limit, const char *endStr)#

Outputs a block of text starting from nLine and ending when the std::string endStr is found.

Parameters
  • outStr – output text

  • line – Input start line number, outputs end line number

  • lines – Input text - one array element per line

  • endStr – End std::string: When this std::string is encountered, the procedure will stop.

  • limit – A limit to the number of lines concatenated

Returns

true if successful, false if endStr was not found before lines finished or limit was reached

pvr::strings::startsWith#

Function Documentation#

inline bool pvr::strings::startsWith(const std::string &str, const std::string &substr)#

Tests if a std::string starts with another std::string.

Parameters
  • str – The std::string whose beginning will be checked

  • substr – The sequence of characters to check if str starts with

Returns

true if the std::string substr is indeed the first characters of str, false otherwise.

pvr::strings::endsWith#

Function Documentation#

inline bool pvr::strings::endsWith(const std::string &str, const std::string &substr)#

Tests if a std::string ends with another std::string.

Parameters
  • str – The std::string whose end will be checked.

  • substr – The sequence of characters to check if str ends with.

Returns

true if the std::string substr is indeed the last characters of str, false otherwise.

pvr::strings::createFormatted#

Function Documentation#

inline std::basic_string<wchar_t> pvr::strings::createFormatted(const wchar_t *format, ...)#

Creates an std::wstring with a printf-like command.

Parameters
  • format – printf-style wide format std::string

  • ... – printf-style variable arguments

Returns

A string containing the output as if the params were passed through printf

pvr::strings::readEOLToken#

Function Documentation#

inline char *pvr::strings::readEOLToken(char *pToken)#

Reads next strings to the end of the line and interperts as a token.

Parameters

pToken – The std::string

Returns

char* The

pvr::strings::getFileDirectory#

Function Documentation#

inline void pvr::strings::getFileDirectory(const std::string &filePath, std::string &outFileDir)#

Retrieves the file directory for the given file path.

Parameters
  • filePath – A file path from which to retrieve the directory.

  • outFileDir – The returned file directory.

pvr::strings::getFileNameAndExtension#

Function Documentation#

inline void pvr::strings::getFileNameAndExtension(const std::string &fileAndExtension, std::string &filename, std::string &extension)#

Separate a filename to name and extension.

The period is returned in neither filename nor the extension

Parameters
  • fileAndExtension – A filename

  • filename – The file part of the name (part before the last ‘.’)

  • extension – The extension part of the name (part after the last ‘.’)

pvr::strings::toLower#

Function Documentation#

inline void pvr::strings::toLower(std::string &str)#

Transforms a std::string to lowercase.

Parameters

str – A std::string to transform.

Returns

A string otherwise equal to the param str, but transformed to lowercase

pvr::strings::vaFormatString#

Function Documentation#

inline std::basic_string<wchar_t> pvr::strings::vaFormatString(const wchar_t *const format, va_list argumentList)#

Creates an std::wstring from a printf style vararg list.

Parameters
  • format – printf-style wide format std::string

  • argumentList – printf-style va_list

Returns

A formatted string, as if the parameters were passed to printf

pvr::utils::convertLRGBtoSRGB#

Function Documentation#

inline glm::vec4 pvr::utils::convertLRGBtoSRGB(const glm::vec4 &lRGB)#

Convert the linear rgb color values in to srgb color space. The Alpha value get unmodified.

Parameters

lRGB – lRGB

Returns

sRGB color value

pvr::utils::convertLRGBtoSRGB#

Function Documentation#

inline glm::vec3 pvr::utils::convertLRGBtoSRGB(const glm::vec3 &lRGB)#

Convert the linear rgb color values in to srgb color space.

Parameters

lRGB – lRGB

Returns

sRGB color value

pvr::utils::packRGBA#

Function Documentation#

inline uint32_t pvr::utils::packRGBA(float r, float g, float b, float a)#

Pack 4 values (red, green, blue, alpha) in the range of 0.0-1.0 into a single 32 bit unsigned Integer unsigned.

Parameters
  • r – Red channel (normalized 0.0-1.0)

  • g – Blue channel (normalized 0.0-1.0)

  • b – Red channel (normalized 0.0-1.0)

  • a – Red channel (normalized 0.0-1.0)

Returns

32 bit RGBA value

pvr::utils::memCopyFromVolatile#

Function Documentation#

template<typename T1, typename T2>
inline void pvr::utils::memCopyFromVolatile(T1 &dst, volatile const T2 &src)#

Copy from volatile memory (facilitate from volatile variables to nonvolatile)

Parameters
  • dst – Copy destination

  • src – Copy source

pvr::utils::packRGBA#

Function Documentation#

inline uint32_t pvr::utils::packRGBA(uint8_t r, uint8_t g, uint8_t b, uint8_t a)#

Pack 4 values (red, green, blue, alpha) in the range of 0-255 into a single 32 bit unsigned Integer unsigned.

Parameters
  • r – Red channel (8 bit)

  • g – Blue channel (8 bit)

  • b – Red channel (8 bit)

  • a – Red channel (8 bit)

Returns

32 bit RGBA value

pvr::utils::reinterpretBits#

Function Documentation#

template<typename Toutput_, typename Tinput_>
Toutput_ pvr::utils::reinterpretBits(const Tinput_ &value)#

Take a value’s bit representation and reinterpret them as another type. Second template parameter should normally be implicitly declared. First template parameter is mandatory.

Parameters

value – The value to reinterpret

Template Parameters
  • Toutput_ – Output value type. Must be explicitly defined.

  • Tinput_ – Input value type. Should not need to be explicitly defined, can be inferred.

Returns

The reinterpreted value

pvr::utils::memSet#

Function Documentation#

template<typename T>
inline void pvr::utils::memSet(T &dst, int32_t i)#

Typed memset. Sets each byte of the destination object to a source value.

Template Parameters

T – Type of target object.

Parameters
  • dst – Reference to the object whose bytes we will set to the value

  • i – The conversion of this object to unsigned char will be the value that is set to each byte.

pvr::utils::memCopyToVolatile#

Function Documentation#

template<typename T1, typename T2>
inline void pvr::utils::memCopyToVolatile(volatile T1 &dst, const T2 &src)#

Copy to volatile memory (facilitate from normal variables to volatile)

Parameters
  • dst – Copy destination

  • src – Copy source

pvr::utils::memCopy#

Function Documentation#

template<typename T1, typename T2>
inline void pvr::utils::memCopy(T1 &dst, const T2 &src)#

Typed memcopy. Copies the bits of an object to another object. Although T1 can be different to T2, sizeof(T1) must be equal to sizeof(T2)

Template Parameters
  • T1 – Type of target object.

  • T2 – Type of the source object.

Parameters
  • dst – Reference to the destination object

  • src – Reference to the source object

pvr::GpuDatatypesHelper::operator|#

Function Documentation#

inline Bits pvr::GpuDatatypesHelper::operator|(Bits lhs, Bits rhs)#

Operator| for a set of bits.

Parameters
  • lhs – Left hand side

  • rhs – Right hand side

Returns

The bits after applying the operator

pvr::GpuDatatypesHelper::operator&=#

Function Documentation#

inline void pvr::GpuDatatypesHelper::operator&=(Bits &lhs, Bits rhs)#

Operator&= for a set of bits.

Parameters
  • lhs – Left hand side

  • rhs – Right hand side

pvr::GpuDatatypesHelper::operator&#

Function Documentation#

inline Bits pvr::GpuDatatypesHelper::operator&(Bits lhs, Bits rhs)#

Operator& for a set of bits.

Parameters
  • lhs – Left hand side

  • rhs – Right hand side

Returns

The bits after applying the operator

pvr::GpuDatatypesHelper::operator|=#

Function Documentation#

inline void pvr::GpuDatatypesHelper::operator|=(Bits &lhs, Bits rhs)#

Operator|= for a set of bits.

Parameters
  • lhs – Left hand side

  • rhs – Right hand side

debuggerBreak#

Function Documentation#

inline void debuggerBreak()#

If supported on the platform, makes the debugger break at this line. Used for Assertions on Visual Studio.

isDebuggerPresent#

Function Documentation#

static inline bool isDebuggerPresent()#

Checks whether a debugger can be found for the current running process (on Windows and Linux only). The prescene of a debugger can be used to provide additional helpful functionality for debugging application issues one of which could be to break in the debugger when an exception is thrown. Being able to have the debugger break on such a thrown exception provides by far the most seamless and constructive environment for fixing an issue causing the exception to be thrown due to the full state and stack trace being present at the point in which the issue has occurred rather than relying on error logic handling.

Returns

True if a debugger can be found for the current running process else False.

Log#

Function Documentation#

inline void Log(const char *formatString, ...)#

Logs a message with severity “ERROR” using the default logger (same as calling Log(LogLevel::Error, …)

Parameters
  • formatString – Printf-style format string for the varargs that follow.

  • ... – Variable arguments for the format std::string. Printf-style rules

Log#

Function Documentation#

inline void Log(LogLevel severity, const char *formatString, ...)#

Logs a message using the default logger.

Parameters
  • severity – The severity of the message. Apart from being output into the message, the severity is used by the logger to discard log events less than a specified threshold. See setVerbosity(…)

  • formatString – A printf-style format std::string

  • ... – Variable arguments for the format std::string. Printf-style rules

assertion#

Function Documentation#

inline void assertion(bool condition, const std::string &message)#

If condition is false, logs a critical error, debug breaks if possible, and - on debug builds - throws an assertion. If you wish to completely compile it out on release, use the macro debug_assertion.

Parameters
  • condition – Pass the condition to assert here. If true, nothing happens. If false, asserts

  • message – The message that will be logged if the asserted condition is false.

assertion#

Function Documentation#

inline void assertion(bool condition, const char *msg)#

If condition is false, logs a critical error, debug breaks if possible, and - on debug builds - throws an assertion. If you wish to completely compile it out on release, use the macro debug_assertion.

Parameters
  • condition – Pass the condition to assert here. If true, nothing happens. If false, asserts

  • msg – The message that will be logged if the asserted condition is false.

DefaultLogger#

Function Documentation#

inline Logger &DefaultLogger()#

Returns the default logger object. This is the only way to get that object. Is global.

Returns

The default logger global logger.

originalDefaultLogger#

Function Documentation#

inline Logger &originalDefaultLogger()#

Returns the original default logger object.

Returns

The original default logger global logger.

assert_warning#

Function Documentation#

inline void assert_warning(bool condition, const char *msg)#

If condition is false, logs a warning.

Parameters
  • condition – Pass the condition to assert here. If true, nothing happens. If false, logs warning.

  • msg – The message that will be logged if the asserted condition is false.

assertion#

Function Documentation#

inline void assertion(bool condition)#

If condition is false, logs a critical error, debug breaks if possible, and - on debug builds - throws an assertion. If you wish to completely compile it out on release, use the macro debug_assertion.

Parameters

condition – Pass the condition to assert here. If true, nothing happens. If false, asserts.

LogClose#

Function Documentation#

inline void LogClose()#

pvr::pfx::readPFX#

Function Documentation#

void pvr::pfx::readPFX(const ::pvr::Stream &stream, const IAssetProvider *assetProvider, effect::Effect &outEffect)#

PFX reader.

pvr::pfx::readPFX#

Function Documentation#

effect::Effect pvr::pfx::readPFX(const ::pvr::Stream &stream, const IAssetProvider *assetProvider)#

PFX reader.

pvr::async::impl::textureLoadAsyncWorker#

Function Documentation#

inline void pvr::async::impl::textureLoadAsyncWorker(TextureLoadFuture future)#

internal

Parameters

future – The Texture load future to kick work for

pvr::assetWriters::writePVR#

Function Documentation#

void pvr::assetWriters::writePVR(const ::pvr::Texture &texture, ::pvr::Stream &stream)#

pvr::assetWriters::writePVR#

Function Documentation#

void pvr::assetWriters::writePVR(const ::pvr::Texture &texture, ::pvr::Stream &&stream)#