Load texture file from file

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

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

    JekaS
    Member

    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.

    #38008

    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.

    Regards,
    Tobias

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