Problem with MultiTexturing! :(

ok,my app keeps crashing when I try to do this:

//The first triangle
glVertex3f( -1.0f, 1.0f, 0.0f);// Top

  glVertex3f( -1.0f, -1.0f, 0.0f);// Bottom Left
  glVertex3f( 1.0f, -1.0f, 0.0f);// Bottom Right


Any idea why? When I created the multitextures I did this:

glBindTexture(GL_TEXTURE_2D, texture[0]);

glBindTexture(GL_TEXTURE_2D, texture[1]);

Once again,any help would be much appreciated

And,yes,I did glEnable(GL_TEXTURE_2D);

Dunno, it should work, but hell, OpenGL is sometimes as quirky as MS software is.

Try this:

Before you make your call to glMultiTextureCoord* insert a call to glActiveTexture setting the correct TMU in action. I do that with my vertex arrays (kinda because I’m not using glMultiTextureCoord), but it might cause the system to respond appropriately.

I think that the way they designed the multitex support on some systems isn’t the standard “expected” way it should be implemented.

Let me know if it works.


Right, looks quite ok.
Maybe that’s too simple, but have you checked the contents of the function pointers you got with wglGetProcAddres?

Oh YES! Got it working! The problem was as you said with the function pointers.I had this call:

glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FARBPROC)wglGetProcAddress(“glMultiTexCoord2f”);

instead of this:

glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FARBPROC)wglGetProcAddress(“glMultiTexCoord2fARB”);

I feel really stupid right now.

Anyway,I finally rendered my image but it appears darker than what I expected.Is that suppose to happen? How can I make it brighter? (Without lights!)
And is there any way to play with the opacity of the other textures? Thanx again guys!

[This message has been edited by TheGecko (edited 08-04-2000).]

Maybe got got some odd blendfunction…

Try play around with different blendfunctions and see what happens. glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) works great for me.

Also, you should try gamma correction, using *_gamma_control extensions, or ICM for windows ( Get/SetDeviceGammaRamp )