pgBitBlt
-
- Posts: 82
- Joined: Mon Jun 20, 2005 3:32 am
pgBitBlt
using pgBitBlt, is it possible to BitBlt to something other than the "screen"..does the psp only have one screen buffer? or can i have like a Graphics object to draw to..then blit that to the screen buffer and then flip that..
i want to be able to blit to other surfaces before flipping them to the screen..
i want to be able to blit to other surfaces before flipping them to the screen..
-
- Posts: 82
- Joined: Mon Jun 20, 2005 3:32 am
-
- Posts: 82
- Joined: Mon Jun 20, 2005 3:32 am
-
- Posts: 82
- Joined: Mon Jun 20, 2005 3:32 am
Right, it's as simple as this.
The PSP has 2Mb of VRAM, this is what the nice pointer that you have is pointing to the top of. Obviously 272 lines at 512 pixels does not use all of it, so all you have to do to get a new framebuffer is write further down in the RAM than the end of the screen of the current buffer. Then all you do is call
to set the screen to be displayed from the pointer pg_vramtop.
Hmm, not really the best explanation ever but have a read of his code along with these comments.
The PSP has 2Mb of VRAM, this is what the nice pointer that you have is pointing to the top of. Obviously 272 lines at 512 pixels does not use all of it, so all you have to do to get a new framebuffer is write further down in the RAM than the end of the screen of the current buffer. Then all you do is call
Code: Select all
pspDisplaySetFrameBuf(pg_vramtop,512,1,1);
Hmm, not really the best explanation ever but have a read of his code along with these comments.
-
- Posts: 82
- Joined: Mon Jun 20, 2005 3:32 am
-
- Posts: 82
- Joined: Mon Jun 20, 2005 3:32 am
You can also point to another area in vram like inomine said and use that as a texture. Rendering to a texture can produce some nice effects. As for how to get started on psp, you might want to look at how things work on PS2 since its heavily documented and would give a firm grasp of the architecture before diving into psp dev. There are a bunch of api lib calls here on the forums.
Last edited by jboldiga on Thu Jun 23, 2005 8:58 am, edited 1 time in total.