What is PVRAssets?

PVRAssets is a simple way to load and handle assets, in particular those in PowerVR formats

About PVRAssets

PVRAssets is used to work directly with the CPU-side of the authored parts of an application, for example models, meshes, cameras, lights, and so on. It is used when dealing with application logic for things like animation and scene management.

It does not contain any code that is related to the graphics API and API objects. A mesh defined in pvr::assets contains raw vertex data loaded in CPU-side memory. This may be decorated by metadata such as datatypes, meaning (semantics), and all the data needed to create a Vertex Buffer Object (VBO), but not the VBO itself. This area is covered by PVRUtils or the application.

PVRAssets is the recommended way to load and handle a multitude of assets. These include all PowerVR formats such as POD or GLTF (models), PVR (textures, fonts), and PFX (effects). The PVRAssets classes map very well to these but can easily be used by other formats as well by extending the AssetReader class for other formats.

How to use PVRAssets

PVRAssets requires and includes PVRCore, and PVRAssets is required by PVRUtilsVk and PVRUtilsGles. It is necessary to link against the PVRAssets library if using its functionality or PVRUtils(Vk/ES). CMake will perform these links automatically, hence if CMake is used to add PVRUtils to a project it will automatically add PVRAssets and PVRCore. Include “PVRAssets/PVRAssets.h” to include all normally required functionality of PVRAssets.

It is best to start from the pvr::assets::Model class to become familiar with PVRAssets.