PVRTexlib – Error reporting

This topic contains 2 replies, has 2 voices, and was last updated by  michaK 5 years, 4 months ago.

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



    I’ve been desperately trying to get the error messages from the pvrtexlib library output somewhere but it seems to me that they are simply completely stripped out the library. I first had a quick look at PVRTError.h and thought: “Cool, I just have to route the calls to OutputDebugStringA when building in DEBUG”. So I tried to get the OutputDebugStringA messages by hooking up to the kernel calls using sysinternal’s WinDebug but couldn’t catch any messages. Then I looked at the definition of PVRTERROR_OUTPUT_DEBUG(A) again and realized that it’s the configuration PVRTexLib was built with that mattered
    So there is no error reporting at all ?
    All I have is the bool returned value ?
    Am I missing something ? If yes, could you point me in the right direction ?
    If no, would it be possible to have access to a debug version of the lib so that I get the reasons why some calls are failing ?
    Perhaps you should allow the developer to hook a function pointer for error reporting.
    Best Regards,
    #if defined(_DEBUG) || defined(DEBUG)
    #if defined(__SYMBIAN32__)
    #define PVRTERROR_OUTPUT_DEBUG(A) RDebug::Printf(A);
    #elif defined(__BADA__)
    #define PVRTERROR_OUTPUT_DEBUG(A) AppLog(A);
    #elif defined(ANDROID)
    #define PVRTERROR_OUTPUT_DEBUG(A) __android_log_print(ANDROID_LOG_INFO, “PVRTools”, A);
    #elif defined(_WIN32) && !defined(UNDER_CE)
    #define PVRTERROR_OUTPUT_DEBUG(A) OutputDebugStringA(A);
    #define PVRTERROR_OUTPUT_DEBUG(A) fprintf(stderr,A);

    Hi Micha,

    Yes unfortunately there was no time to add proper error reporting functionality to the last version of texlib so I’m afraid all you currently have to go on is the boolean value – typically there’s no reason for a failure except for incorrect texture set-up though, so if you could post an example of how things are failing I’ll be more than happy to point you in the right direction.

    PVRTError.h is currently only included because it is needed by PVRTMap.h which is used by the library. A future version will hook proper error messages back into the library.




    Hi Tobias,
    Thanks for your answer. Yeahh… That’s what I figured out. You probably saw my other post, the resize / mipmap issue was indeed … a format issueWacko. Everything is starting to work as expected and running windows and mac osx smoothly under a mono/.NET assets cached batch conversion engine. Happy to see the lib seems to behave well and make efficient use of the logical cores available now. On All platforms.
    I only have a dxt compression issue to resolve. Will make a separate post if necessary.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.