Loading 2048×2048 Textures with PVRTTextureLoadFr

This topic contains 5 replies, has 3 voices, and was last updated by  demione 7 years, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #30026

    demione
    Member

    I’m an iPhone developer who has been toying with the demos provided with the SDK, most notably the Clipping Planes demo. In it, I’m trying to replace the texture used with the sphere with a 2048×2048 pixel texture I created with your texture generator util.

    For some reason, the only device that seems to support loading a 2048×2048 texture is my iPhone 3GS. The app crashes when I run the demo on any of my older iPhones or iPod Touches. On any of these devices, the maximum texture size that will allow the app to run correctly is 1024×1024, which is contrary to what the system specs for these devices report (Apple says they should all be able to handle 2048×2048). I’ve stepped into the PVRTTextureLoadFr function, and the error occurs in its glTexImage2D call (it returns error code 0x501 for GL_INVALID_VALUE).

    Thanks in advance!

    #33671

    Gordon
    Moderator

    According to the Apple documentation here:

    http://developer.apple.com/iphone/library/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESPlatforms/OpenGLESPlatforms.html#//apple_ref/doc/uid/TP40008793-CH106-SW3

    only the 3GS and the 3rd generation iPod (16GB, 32GB) should support 2048×2048 textures. The OpenGL ES implementations on the earlier devices only support 1024×1024, I’m afraid.

    #33672

    demione
    Member

    My apologies! I guess I got bad info somewhere.

    Going forward, I figure I have two options. One is to break the texture image up into two 1024×1024 images, and texture exactly half the sphere with each of them. The other possibility would be to use two models which are both a half sphere, each accepting a 1024×1024 image.

    However, it looks as though I have to edit the POD file to accomplish either of these. From what I understand POD is a proprietary extension that is generated via a one-way conversion from MAX format. To make matters worse, I’m not a 3D designer and don’t have access to 3dsmax. What would you recommend doing at this point?

    Thanks!

    #33673

    warmi
    Member

    There is really nothing properietary about POD files … they are fully documented in the SDK.

    Having said that, if you don’t have access to any 3d app… personally, I would generate my own geometry for 2 half spheres rather than to try to mess with the existing POD vertex stream.

    It is not hard .. if you understand how to deal with VBOs then here is some code for generating normal/uv mapped spheres.

    http://www.ogre3d.org/wiki/index.php/ManualSphereMeshes

    #33674

    Gordon
    Moderator

    As warmi says, as long as your model is simple then it may be easier to generate the geometry from scratch. If you have access to Maya on windows then you can also export from this to POD.

    Otherwise, your best approach would be to export from a 3D application to the COLLADA format and then use the Collada2POD application that we provide to generate a POD file. Blender, for instance, can produce Collada files and is free – other programs should also be able to do this.

    #33675

    demione
    Member

    Thanks guys, this helped a lot.

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