| View previous topic :: View next topic |
| Author |
Message |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Mon Sep 19, 2005 2:52 pm Post subject: Coordinate system |
|
|
| Sorry for the newbie question, but I could find by searching. What is the coordinate system on PSP. Is it right-handed y-down like in PS2, or what? |
|
| Back to top |
|
 |
0x0001

Joined: 21 Jul 2005 Posts: 11
|
Posted: Tue Sep 20, 2005 10:53 am Post subject: |
|
|
yes cordinates are x across y down
same as ps2
480 pixels for x
272 for y |
|
| Back to top |
|
 |
RustyFunkNut
Joined: 26 Sep 2005 Posts: 17 Location: London, UK
|
Posted: Mon Sep 26, 2005 5:32 am Post subject: |
|
|
| It's also worth pointing out that ScePspMatrix4 is transposed with respect to a D3DMATRIX. Caught me out when converting some of my old code across :) |
|
| Back to top |
|
 |
CyberBill
Joined: 26 Jul 2005 Posts: 86 Location: Redmond, WA
|
Posted: Mon Sep 26, 2005 5:48 am Post subject: |
|
|
| PSP Matrices are directly in line with OpenGL matrices, but yes, D3D matrices have their axis reversed. |
|
| Back to top |
|
 |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Thu Sep 29, 2005 9:54 am Post subject: |
|
|
Thanks for the info all. I am still playing around with getting my existing camera code working. After not making much progress I am trying to get a simplification working first.
If I set my View Matrix up as follows:
| Code: | sceGumMatrixMode(GU_VIEW);
sceGumLoadIdentity();
|
then I get what I expect, the camera at the origin, aligned with the z-axis, and I can see parts of my scene as I would expect.
If I set my View Matrix up as follows:
| Code: | ScePspFMatrix4 worldM;
matrix_identity( (float*)&worldM); // taken from lights.c sample code
sceGuSetMatrix(GU_VIEW, &worldM);
|
Then I am not able to see anything but black screen. I am not really sure why these would be different. Does anybody have any ideas? I am wondering if it could be single vs double precision float issues? or maybe sceGuSetMatrix() has a bug in implementation?
Any help is GREATLY appreciated!! |
|
| Back to top |
|
 |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Thu Sep 29, 2005 10:26 am Post subject: |
|
|
Ok, so after taking a different approach I see that I can use:
| Code: | sceGumMatrixMode(GU_VIEW);
sceGumLoadMatrix(&worldM); |
Which seems to work better. I don't know why | Code: | | sceGuSetMatrix(GU_VIEW, &worldM); |
doesn't work right, but I am off and running again... |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Thu Sep 29, 2005 5:45 pm Post subject: |
|
|
the GUM library uses sceGuSetMatrix() internally, so I doubt that's what at fault. Are you using sceGum* methods to draw aswell? In that case perhaps you have dirty data in the view-matrix that gets flushed when you render. _________________ GE Dominator |
|
| Back to top |
|
 |
Paco
Joined: 09 Oct 2005 Posts: 54
|
Posted: Tue Oct 11, 2005 9:22 am Post subject: |
|
|
For what is worth, I'm using my old left-handed matrix code (from D3D engine) on the PSP successfully, zero changes were needed. X to the right, Y up, Z into the screen, which IIRC was the way D3D wanted it for W-Buffering.
Different coordinate systems suck. _________________ Paco |
|
| Back to top |
|
 |
|