So far, I can see my 3d model. it renders fine. However If I try to add a texture to it, the texture turns to a pink color and is distorted but the model still stays in tact.
I modified the samples/gu/cube example.
I have a model with 756 faces. One face contains example data such as,
Code: Select all
//Triangle(Polygon / Face): 1
{0.718750, 0.062500, 0x00000000, 0.206043, 3.961590, 14.356922},
{0.707031, 0.105469, 0x00000000, -0.356571, 5.847838, 15.658901},
{0.687500, 0.074219, 0x00000000, -1.833433, 4.500518, 14.877714},
My texture is 256x256. I saved it as a RAW format just like in the Cube example. I converted my texture from a 24-bit True color BMP to an Interleaved Ordered RAW image.
I used the same intialization code as in the cube example. All of my code is pretty much the same as the Cube exmaple except for the following lines,
Code: Select all
sceGuTexImage(0,256,256,256,body_start);
sceGumDrawArray(GU_TRIANGLES,GU_TEXTURE_32BITF|GU_COLOR_8888|GU_VERTEX_32BITF|GU_TRANSFORM_3D,756*3,0,vertecies);
My body (body.raw) texture is linked in with my code just fine using bin2o.
Any ideas about what I am doing wrong?
Thanks!