PDA

View Full Version : SDL and multitexturing problem



02-16-2002, 04:51 PM
SDL keeps crashing when I use multitexturing.
Here is a code segment:

PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;
PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL;
.
.
.
glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress("glActiveTextureARB");
glClientActiveTextureARB= (PFNGLCLIENTACTIVETEXTUREARBPROC) wglGetProcAddress ("glClientActiveTextureARB");
glActiveTextureARB(GL_TEXTURE0_ARB);
.
.
.
glActiveTextureARB(GL_TEXTURE0_ARB);
glClientActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture (GL_TEXTURE_2D, 2);

glActiveTextureARB(GL_TEXTURE1_ARB);
glClientActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture (GL_TEXTURE_2D, 1);
.
.
.
glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 1.0f, 1.0f); <- crashes on this call.

I'm useing the newest sdl under windows 2000 with a geforce2.

Thanks for any inseight anyone can provide.

chowe6685
02-16-2002, 05:40 PM
it looks as though you didn't get the address of glMultiTexCoord2fARB with wglGetProcAddress, at least your posted code doesn't have a line to do it.

02-16-2002, 10:22 PM
DOH! I guess that would explain why it errored when I used it.

Thanks a lot for the help, I guess I just kept missing it when I was going through the code.