I'm trying with sceGumOrtho but it hangs my PSP :(
Code: Select all
sceGumMatrixMode(GU_PROJECTION);
sceGumLoadIdentity();
sceGumOrtho(0,480,272,0,0,1);
Code: Select all
void myOrtho(float left, float top, float right, float bottom, float near, float far) {
ScePspFMatrix4 matrix;
float *m = (float*)&matrix;
float width = right-left;
float height = bottom-top;
float depth = near-far;
m[0*4+0] = 2.0f/width;
m[1*4+1] = 2.0f/height;
m[2*4+2] = 2.0f/depth;
m[3*4+0] = -(left+right)/width;
m[3*4+1] = -(top+bottom)/height;
m[3*4+2] = -(near+far)/depth;
m[3*4+3] = 1.0f;
sceGuSetMatrix(GU_PROJECTION, &matrix);
}
Thank you very much in advance for your replies!