I have ubuntu installed. And I am trying an OpenGL application. Far to know everything was ok. But today while trying multitexturing, I faced the following error.
error: %glActiveTexture% was not declared in this scope.
I checked on the GL/gl.h file [that I had included] and found the following declarations ::
gl.h should not have this prototype. glext.h should have prototypes, and should be this file here glext.h directly off the the OpenGL Registry page on this site. gl.h includes glext.h if you define GL_GLEXT_PROTOTYPES.
gl.h should not have this prototype. glext.h should have prototypes, and should be this file here glext.h directly off the the OpenGL Registry page on this site. gl.h includes glext.h if you define GL_GLEXT_PROTOTYPES.
So all you should have to do is this:
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
Then just reference glActiveTexture.
[/QUOTE]
The gl.h provided by mesa seems not to include glext.h when GL_GLEXT_PROTOTYPES is defined. Instead you have to define GL_GLEXT_LEGACY if you want gl.h to include glext.h
I am using CUDA, and CUDA makefile for compiling my source code. For some reason CUDA uses its own include/GL/<GL_FILES>. And its gl.h wasn’t declaring glActiveTexture(). Instead have to include glew.h.
Now I have bumped with segmentation faults whenever I call glActiveTexture. But I hope that I will solve it.