| View previous topic :: View next topic |
| Author |
Message |
Archaemic
Joined: 18 Mar 2007 Posts: 38
|
Posted: Thu May 24, 2007 10:41 am Post subject: Mixing SDL and PSPGU OR PSPGL texturing questions |
|
|
Can you mix SDL and PSPGU? And if so, how? Resizing everything on the CPU is really awful. I thought I might be able to mix PSPGL with SDL, but it looks like textures are necessarily in VRAM on PSPGL (am I mistaken? If so, how do you make the textures in regular RAM?). The texture is not used that much. I just want to mark a certain area of memory as the texture to use, draw it, and then remove it. That's for PSPGL, if I can do that. If not, I want to mix PSPGU and SDL. I load all the images with SDL_image, but resizing is a pain, and too slow. The textures I have are generally too large to fit in VRAM, so I need them to be loaded in regular RAM (they are usually 3 - 7 MB, sometimes as large as 10 MB).
So I'm just wondering how to render to an SDL screen with PSPGU if it can be done, or how to mark a section of memory as a texture for PSPGL. I'm really having trouble finding answers on Google. |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Thu May 24, 2007 3:52 pm Post subject: |
|
|
You should be able to just use normal SDL GL stuff.
See rRootage in the pspware repository for an example. |
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Thu May 24, 2007 6:41 pm Post subject: Re: Mixing SDL and PSPGU OR PSPGL texturing questions |
|
|
| Archaemic wrote: |
So I'm just wondering how to render to an SDL screen with PSPGU if it can be done, or how to mark a section of memory as a texture for PSPGL. I'm really having trouble finding answers on Google. |
You can't render to system ram. So unless you fit your render texture into VRAM, you're out of luck. _________________ <Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl |
|
| Back to top |
|
 |
Archaemic
Joined: 18 Mar 2007 Posts: 38
|
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Fri May 25, 2007 12:19 am Post subject: |
|
|
You can render FROM system ram, yes, you just need to give the pointer to the texture in the sceGuTexImage function. The only limitation is that the texture is 512x512 max (I doubt your 7-10MB image fits those restrictions, so you'd need to subdivide the rendering into seperate tiles).
The rendertarget needs to reside in VRAM and is also 512x512 max (specified via sceGuDrawBuffer[List]()). _________________ <Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl |
|
| Back to top |
|
 |
|