Reading vertex data from a SPODMesh object

This topic contains 1 reply, has 2 voices, and was last updated by  warmi 9 years ago.

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

    vezza
    Member

    Hi,
    I am trying to do some basic tests to optimize performance and I need to pre-process my meshes and change their vertex data in some way (for example the UV coords). I see that the SPODMesh structure holds the data as it is stored in the POD file, so cycling thought is not exactly an immediate thing.
    Can I suggest to add helper methods to the mesh that expose the data in a more standard way? Something like float* GetUVArray() or something similar. These methods would then handle all the various optsions (strides, stripping, interleave, …) and the API for the developer would be more straightforward.
    In the meantime if anybody has sample code to share for looping through all the UV coordinates of a mesh I’d apreciate it.
    Thanks,

       Luca

    #32394

    warmi
    Member

    If I remember correctly, the internal format used in POD files  is pretty

    much the same as the format used by the hardware itself.

     

    In any case, take a look at this example ( in the SDK) :

    Imagination TechnologiesPowerVR SDKOGLES-1.1_WINDOWS_PCEMULATION_2.03.23.1162DemosVaseOGLESOGLESVase.cpp

     

    void OGLESVase::DrawReflectiveMesh(unsigned int ui32MeshID, PVRTMat4 *pNormalTx)

     

     

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