View Full Version : using Multitexturing
Mickey_dup1
03-14-2006, 06:51 AM
Hi, I'm trying to enable multitexturing (my video support it!), but on glActive below, my application crash and appear 'report bug error' (i'm under winXP). Why this? Thanks
glEnable(GL_TEXTURE_2D);
printf("active multiTexturing\n");
glActiveTextureARB(GL_TEXTURE0_ARB);
printf("after active multiTexturing\n");
glDisable(GL_TEXTURE_2D);
Probably you need to activate your function pointer with something like wglGetProcAddress or use one of extention loading library (for example glew).
Mickey_dup1
03-14-2006, 09:58 AM
I don't understand how. I'm a newbie. I have incuding <GL/glew.h>...but occur this error at runtime..
Poons
03-15-2006, 02:31 AM
you can get the function pointer the following way:
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress("glActiveTextureARB");
you should check the pointer afterwards if it is null (in that case wglGetProcAddress wasn't successful)
sqrt[-1]
03-16-2006, 02:03 AM
If you are using glew, ensure you have initialized it. (eg. called glewInit()? once you have a render context)
Mickey_dup1
03-16-2006, 05:04 AM
Originally posted by sqrt[-1]:
If you are using glew, ensure you have initialized it. (eg. called glewInit()? once you have a render context) Thanks it was this. I also make glewInit() but in a wrong place...bye
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.