Jump to content
  • Advertisement
Sign in to follow this  
RenderCache

texture mapping(simple yet puzzling)

This topic is 5400 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi! i happen to output some textured data in a pbuffer (8bit per color channel) now i need to draw a screen space quad with that texture in the framebuffer unfortuately couldnt get it to work even with this simple code, my screen space quad draws fine(i used a simple color to test) but my texture is not shown. note that my texture is used with the pbuffer.
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();

glEnable(GL_TEXTURE_RECTANGLE_NV);
glBindTexture(GL_TEXTURE_RECTANGLE_NV, 8);//TESTING
	
glBegin(GL_QUADS);
glTexCoord2i(0, 0);
glVertex3i(-1, -1, -1);
glTexCoord2i(1, 0);
glVertex3i(1, -1, -1);
glTexCoord2i(1, 1);
glVertex3i(1, 1, -1);
glTexCoord2i(0, 1);
glVertex3i(-1, 1, -1);
glEnd();

glDisable(GL_TEXTURE_RECTANGLE_NV);

glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();


anyone? thx! [Edited by - RenderCache on October 5, 2004 8:59:34 AM]

Share this post


Link to post
Share on other sites
Advertisement
Your codesample seems ok - I'm guessing the error is elsewhere.
(have you tried with an ordinary texture (no pbuffer) ?)

How do you put data into the pbuffer? In which context is the texture you're speaking of created? (You might want to take a look at wglShareLists() )

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!