 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
HexDump
Joined: 07 Jun 2005 Posts: 70
|
Posted: Thu Mar 30, 2006 9:07 pm Post subject: Newbie question on gu... |
|
|
Hi,
I´trying to get sprites working, but there are things that I don´t unerstand and help doesn´t clarifies it, here they are:
sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2));
sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT);
Helps says that this centers the coordinate space. Then sets a viewport starting at 2048,2048.
Whit this configuration won´t we miss part of the screen we wrote?, if we start writing at 2048-(src_WIDTH/2) and viewpot starts at 2048?.
Umm, Perhaps I´m messed, but I´m a dx man, haven´t used ogl for years.
Thanks in advance,
HexDump. |
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Fri Mar 31, 2006 7:59 am Post subject: |
|
|
| Quote: | | Helps says that this centers the coordinate space. |
That's exactly what it does - it sets the screen pixel coordinate where the virtual screen coordinate system originates, ie. where the pixel will be plotted if the coordinates are (0,0,0). Since you're able to set vertices to negative and positive values, you'll get clear why you don't miss anything of the virtual viewport. It's just one half screen space to top, bottom, left and right from the sceGuOffset position.
I know the name is somewhat misleading, as you might think thats where the GU starts drawing, meaning where the first pixel on screen is located.
Hope that clears that out |
|
| Back to top |
|
 |
HexDump
Joined: 07 Jun 2005 Posts: 70
|
Posted: Fri Mar 31, 2006 6:24 pm Post subject: |
|
|
Thanks a lot Raphael, you've been really helpfull as allways.
HexDump. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|