I've just updated the pspsdk, which updated a lot of the gu and gum files. But now I'm having problems with my code ? It seems like it translates before it rotates. So that my objects are flying around the screen ?
Have anybody else have had this problem ? Or could someone try and update the pspsdk and build their applications again.
EDIT : I just tried downgrading to revision 1164 and that works fine, so it is something which has been changed from that revision up to revision 1195.
I've added a simple example below, which just render a couple of cubes, which are all centered around the center (0,0,0).
Code: Select all
sceGumMatrixMode(GU_PROJECTION);
sceGumLoadIdentity();
sceGumPerspective(75.0f,16.0f/9.0f,0.5f,1000.0f);
sceGumMatrixMode(GU_VIEW);
sceGumLoadIdentity();
// setup matrices for cube
for (int count = 0 ; count < CUBE_COUNT ; count++)
{
/* Draw cube */
sceGumMatrixMode(GU_MODEL);
sceGumLoadIdentity();
{
ScePspFVector3 pos = { -1*CUBE_COUNT/2+count, 0, -4.5f };
ScePspFVector3 rot = { val * 0.59f * (GU_PI/180.0f) / 2.0f,
val * 0.78f * (GU_PI/180.0f) / 2.0f,
val * 1.12f * (GU_PI/180.0f) / 2.0f};
sceGumRotateXYZ(&rot);
sceGumTranslate(&pos);
}
sceGumDrawArray(GU_TRIANGLES, GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_3D, 12*3, 0, ::vertices);
}