Jump to content

  • Log In with Google      Sign In   
  • Create Account

GL_TEXTURE_RECTANGLE_NV problem


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 happygolucky   Members   -  Reputation: 122

Like
0Likes
Like

Posted 30 April 2007 - 10:05 AM

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

#2 V-man   Members   -  Reputation: 809

Like
0Likes
Like

Posted 30 April 2007 - 01:01 PM

Are you checking for gl errors?

Sprinkle glGetError everywhere.

#3 happygolucky   Members   -  Reputation: 122

Like
0Likes
Like

Posted 01 May 2007 - 02:24 AM

yup I'm checking them. No errors, all is good. :(




#4 Zipster   Crossbones+   -  Reputation: 1709

Like
0Likes
Like

Posted 01 May 2007 - 03:59 PM

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.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS