glMultiTexCoordsARB - invalid operation

Started by
1 comment, last by uto314 19 years, 4 months ago
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.
- a human beyond the bug -
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

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]
- a human beyond the bug -

This topic is closed to new replies.

Advertisement