# OpenGL glMultiTexCoordsARB - invalid operation

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

## 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;

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 on other sites
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 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]

1. 1
2. 2
Rutin
22
3. 3
4. 4
JoeJ
16
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631776
• Total Posts
3002299
×