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 

PSPGL news

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



Joined: 12 Jul 2005
Posts: 254

PostPosted: Wed Jan 11, 2006 11:25 am    Post subject: PSPGL news Reply with quote

I've been adding more stuff to PSPGL. The big addition is render to texture:


This is implemented in terms of EGL Pbuffers, which turned out to be pretty simple and quick to do. The API is simple:
Code:

    pbuffer = eglCreatePbufferSurface(dpy, pbuffer_config, texture_attrib);

...
   // make pbuffer the render target
   eglMakeCurrent(dpy, pbuffer, pbuffer, ctx);
   // render into pbuffer

   // make screen the render target again
   eglMakeCurrent(dpy, screen, screen, ctx);
   glBindTexture(GL_TEXTURE_2D, texid)
   eglBindTexImage(dpy, pbuffer, EGL_BACK_BUFFER);

   // render using pbuffer texture

See pspgl/tests/eglpbuffers.c for a full example.

This is pretty similar to the standard EGL pbuffer API, but it imposes fewer restrictions; for example, you can use a surface for rendering, even if it is bound to a texture (though obviously you get pretty undefined results if you render from a texture into itself - though it might be worth trying). Other GL features, such as automatic mipmap generation, work with pbuffer-derived textures.

I'm still planning on implementing Pixel Buffer Objects and Frame Buffer Objects. These extensions also allow render-to-texture, but in a more standard and flexible way (though perhaps more complex to use and implement).
Back to top
View user's profile Send private message Visit poster's website
patpsp



Joined: 25 Oct 2005
Posts: 31

PostPosted: Sat Jan 14, 2006 2:06 am    Post subject: Reply with quote

Very good news ! Thanks for your work !
Back to top
View user's profile Send private message
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