sceGuTexImage( 0, Width, Height, Witdh, data);
I can't understand well this 4th parameter, I found it's not the width, but you've got to set the same value of the texture width: it's always ok since we use square textures (128*128.. 512*512 ecc) but when I got to use a texture of 32pixels * 128? What is exactly this value?
sceGuTexImage 4th parameter?
Parameter 2 is the texture width
Parameter 4 is the texture buffer width.
There's a big difference between the two... The second parameter is required to be a power of 2, and describes how to address inside the texture. Parameter 4 describes how the texture is layed out in memory, and is required to be aligned to 16 pixels, but need not be to be set to the same value as the texture width, you can for example set the hardware to render from a 256x256 texture stored inside a 512x256 block:
Parameter 4 is the texture buffer width.
There's a big difference between the two... The second parameter is required to be a power of 2, and describes how to address inside the texture. Parameter 4 describes how the texture is layed out in memory, and is required to be aligned to 16 pixels, but need not be to be set to the same value as the texture width, you can for example set the hardware to render from a 256x256 texture stored inside a 512x256 block:
Code: Select all
sceGuTexImage(0, 256, 256, 512, texture);
GE Dominator
I got it! So, if I have only one texture in an image, I will use the image width, while if I have prepared a font table image, I will set the buffer width to the font width so that the gu can jump correctly to the rightmost pixel to the first one of the next line, isn't it?
Thanks for telling me, this is really important and useful (assuming I understood hehe) :D
Thanks for telling me, this is really important and useful (assuming I understood hehe) :D