Sign in to follow this  

GL_TEXTURE_RECTANGLE_NV problem

This topic is 3913 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

Hey there, I am trying to use rectangle textures using the GL_TEXTURE_RECTANGLE_NV extension, and for some reason, I can't figure out how to map that damn rectangle texture on an object. On ATI, using the respective functions and enums of GL_TEXTURE_RECTANGLE_EXT extension, it works perfectly. When it comes to use the NV extension, the texture bound on GL_TEXTURE_2D target gets used instead for texturing, even if I explicitely called: glDisable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_RECTANGLE_NV); before rendering my mesh. What is wrong in the way I use that extension? Basically, the calls I make for rendering looks like this: // Render an object using a Pow Of 2 texture. glEnable(GL_TEXTURE_2D); glBind(GL_TEXTURE_2D, Tex2DRef ); // yadda yadda - setting up other stuff using target GL_TEXTURE_2D glDrawElements(); // Works fine, uses the 2D texture correctly. // Render an object using Rectangle texture. glDisable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_RECTANGLE_NV); glBind(GL_TEXTURE_RECTANGLE_NV, TexRectRef ); // yadda yadda - setting up other stuff using target GL_TEXTURE_2D glDrawElements(); // Uses the 2D texture instead of the expected NV Rect texture. Any hint of what is wrong? --HappyGoLucky

Share this post


Link to post
Share on other sites
Are you checking for gl errors?

Sprinkle glGetError everywhere.

Share this post


Link to post
Share on other sites
Are you trying to use an NV extension on ATI hardware? That could be the problem :) I personally used GL_TEXTURE_RECTANGLE_ARB since it works on both.

Share this post


Link to post
Share on other sites

This topic is 3913 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this