Load texture file from file

This topic contains 1 reply, has 2 voices, and was last updated by  Tobias Hector 4 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #31490


    If TexTool user manual to load texture from file constructor is used:

    CPVRTexture cTexture(filePath);

    Is there any way to find out if texture loading was successful or not?

    There are methods
    bool privateLoadPVRFile(FILE* pTextureFile);
    bool privateLoadKTXFile(FILE* pTextureFile);
    bool privateLoadDDSFile(FILE* pTextureFile);
    wich return bool but they all in private section.


    Hi JekaS,

    You can find out if a texture load has been successful by querying the texture’s data size ( getDataSize() ) after creation. If it has a size of zero, then the load was unsuccessful. FYI, I plan to change file loading so that it uses factory functions in a future version of the API so that it can actually return proper error codes.


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