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.

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
3. 3
4. 4
5. 5

• 14
• 9
• 9
• 10
• 12
• Forum Statistics

• Total Topics
632911
• Total Posts
3009183
• Who's Online (See full list)

There are no registered users currently online

×

Important Information

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!