Simple C++ sample code for PVRTC compression?

This topic contains 2 replies, has 3 voices, and was last updated by  Lawrence 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #54446

    B
    Member

    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.

    #54560

    Hi,

    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/

    bests,
    Marton Tamas

    #54567

    Lawrence
    Moderator

    Hi B,

    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.

    Lawrence

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.