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] Problems with rendering to texture.

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



Joined: 04 Jul 2006
Posts: 30

PostPosted: Sun Oct 14, 2007 3:25 am    Post subject: [pspgl] Problems with rendering to texture. Reply with quote

Hi,

I'm trying to render my scene to texture. I use the code from the sample "copytex.c" from PSPGL.

I'm creating a texture:
Code:

int render_texture;
glBindTexture(GL_TEXTURE_2D, render_texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_DEBUG_PSP, GL_TRUE);

And try to 'capture' my scene with glCopyTexImage2D:
Code:

glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, render_texture);
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 256,256, 0);

and all I have is random flickering green texture with some noise or with random parts of other textures i've loaded before.

Anyone can help me to solve this?
Back to top
View user's profile Send private message Visit poster's website
LarryTM



Joined: 04 Jul 2006
Posts: 30

PostPosted: Wed Oct 17, 2007 10:08 am    Post subject: Reply with quote

anyone?
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Oct 17, 2007 10:36 am    Post subject: Reply with quote

You're only posting a TINY piece of the code, and probably not where the error lies. If you want more help, you'll have to post more.
Back to top
View user's profile Send private message AIM Address
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