Why does my CPVRTPrint3D SetTextures always fail?

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

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

    In my code,

    I put following in the ReleaseView()

        /* Release the Print3D textures and windows */  
        gsMyPrint3D.DeleteAllWindows();  
        gsMyPrint3D.ReleaseTextures();

     

    I put following in the InitView()

        /* Init Print3D to display text on screen */  
        if(!gsMyPrint3D.SetTextures(0,PVRShellGet(prefWidth),PVRShellGet(prefHeight)))  
        {  
            PVRShellSet(prefExitMessage, “ERROR: Failed to initialise Print3Dn”);  
            return false;  
        }

     

    I put following in the RenderScene() (I also used FragShader and vertshader on a special 3D object in the current window before print out text)

        /* Print text on screen */  
        gsMyPrint3D.DisplayDefaultTitle(“Test”, “First test with PVRTC”, ePVRTPrint3DLogoIMG);      
        /* Flush all Print3D commands */  
        gsMyPrint3D.Flush();

     

    But my program always exit with “ERROR: Failed to initialise Print3Dn”. In other word, the SetTextures function always return PVR_FAIL.

    Could anyone give me a hint why the SetTextures is not working correctly?

     

    THank you very much!

     

    Renaissance
    #34018

    Scott
    Moderator
    Hi,

     

    Your line for SetTextures should be

     

    Code:
    if(gsMyPrint3D.SetTextures(0,PVRShellGet(prefWidth),PVRShellGet(prefHeight)) != PVR_SUCCESS)  

     

    instead of

     

    Code:
    if(!gsMyPrint3D.SetTextures(0,PVRShellGet(prefWidth),PVRShellGet(prefHeight)))  

     

    as SetTextures returns zero (PVR_SUCCESS) on success and not on failure.

     

    Thanks,

     

    Scott

     
    #34019

    Thanks a lot, Scott.

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