 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
LarryTM
Joined: 04 Jul 2006 Posts: 30
|
Posted: Sun Oct 14, 2007 3:25 am Post subject: [pspgl] Problems with rendering to texture. |
|
|
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 |
|
 |
LarryTM
Joined: 04 Jul 2006 Posts: 30
|
Posted: Wed Oct 17, 2007 10:08 am Post subject: |
|
|
| anyone? |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Wed Oct 17, 2007 10:36 am Post subject: |
|
|
| 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 |
|
 |
|
|
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
|