Tagged: pvrtc compression c++
- October 6, 2016 at 9:40 pm #54446
PVR newbie here: Can anyone point me to C++ sample code for PVRTC compression?
I’ve just downloaded the sdk, successfully built and run the example projects (OS X) and have been browsing the FAQs, Forum, and documentation. The closest I’ve come is this: https://community.imgtec.com/forums/topic/switch-png-to-pvr-with-pvrtextool-in-c/
(and similar snippets elsewhere)
However, the snippet doesn’t show which headers I need, and searching on namespace “pvrtexture”, class “CPVRTextureHeader”, and method “Transcode” (all seen in the referenced code snippet) all turn up zero results when I search on the example projects or simply search the SDK install directory.
Any help getting initial setup appreciated.October 11, 2016 at 2:41 pm #54560
the PVRTC source code is not open source/public.
There is a public whitepaper available about it: http://cdn.imgtec.com/sdk-documentation/PVR+Texture+Compression.Whitepaper.pdf
Otherwise you can just use the PVRTexTool (gui or command line) from the PVR SDK: https://community.imgtec.com/developers/powervr/installers/
Marton TamasOctober 11, 2016 at 3:24 pm #54567
The SDK source does not contain code to create/compress textures, only code to load them up and push them to the graphics APIs.
What you are looking for is PVRTexTool. This is made up of a GUI tool, a command line tool, a dynamic/shared library and plugins for various applications such as Photoshop.
Install PVRTexTool, as Marton mentioned, and use the headers in PVRTexTool/Library/Include together with the library PVRTexTool/Library/OSX_x86/libPVRTexLib.dylib.
Let us know if you need any further help.