forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mixing SDL and PSPGU OR PSPGL texturing questions

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Archaemic



Joined: 18 Mar 2007
Posts: 38

PostPosted: Thu May 24, 2007 10:41 am    Post subject: Mixing SDL and PSPGU OR PSPGL texturing questions Reply with quote

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
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Thu May 24, 2007 3:52 pm    Post subject: Reply with quote

You should be able to just use normal SDL GL stuff.
See rRootage in the pspware repository for an example.
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Thu May 24, 2007 6:41 pm    Post subject: Re: Mixing SDL and PSPGU OR PSPGL texturing questions Reply with quote

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
View user's profile Send private message Visit poster's website
Archaemic



Joined: 18 Mar 2007
Posts: 38

PostPosted: Thu May 24, 2007 9:10 pm    Post subject: Reply with quote

That's what I thought too, until I saw this:
http://psp.jim.sh/pspsdk-doc/group__GU.html#g744910ac833c3aeed7e04c790833dc3a

Or wait, you said render to system memory. The SDL screen is allocated in hardware. I want to render something FROM memory TO vram. Really, I just want to take advantage of the GE for a boost in resizing speed.
Back to top
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Fri May 25, 2007 12:19 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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