Jump to content
  • Advertisement
Sign in to follow this  
uto314

OpenGL glMultiTexCoordsARB - invalid operation

This topic is 5053 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, does someone knows in which case the call to glMultiTexCoord2fARB can produce an invalid operation ? -uto- here the code, the output is : "error2: invalide operation"

unsigned width = 320;
unsigned height= 640;

glActiveTextureARB(GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_RECTANGLE_NV,m_textureId);
glEnable(GL_TEXTURE_RECTANGLE_NV);
if (COpenGL::CheckError()) std::cerr << "error1: " << COpenGL::glErrorString << std::endl;	
glBegin(GL_QUADS);
	
glMultiTexCoord2fARB(GL_TEXTURE0_ARB,0,0);
glVertex3f(0,0,0);

glMultiTexCoord2fARB(GL_TEXTURE0_ARB,0,height);
glVertex3f(1,0,0);

glMultiTexCoord2fARB(GL_TEXTURE0_ARB,width,height);
glVertex3f(1,1,0);

glMultiTexCoord2fARB(GL_TEXTURE0_ARB,width,0);
glVertex3f(0,1,0);
glEnd();

if (COpenGL::CheckError()) std::cerr << "error2: " << COpenGL::glErrorString << std::endl;
glActiveTextureARB(GL_TEXTURE0_ARB);
glDisable(GL_TEXTURE_RECTANGLE_NV);
ps : my hardware support all the extension, I use that in an other program.

Share this post


Link to post
Share on other sites
Advertisement
This is just from a top of my head, but maybe, just maybe, the problem was in the texture generation, and when you try to work with it creates an error.

Are the dimensions for the texture you are using a power of 2? (i'm suspicious because of the 320x640 thing)

Try using the same code but just without the Multi Texturing (using glTexCoord)

EDIT:

Cancel my power of 2 comment. I didn't see GL_TEXTURE_RECTANGLE_NV. Sorry :P

Share this post


Link to post
Share on other sites

Actually I tried without multitexturing before, there is no error.
The texture generation is ok, I can display the quad textured with a simple glsl shader, but I can't without shader. I might miss something but why.. I am trying to figure out.
-thanks,
-uto-

EDIT: the reason is simply because I use a floating point rectangle texture. I would expected to figure out that before posting that, but sometimes...:(


[Edited by - uto314 on December 14, 2004 10:08:30 PM]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!