I am having trouble using extensions in multiple files in windows. This is probably more a programming issue than and openGL but it involves extensions. Here’s my problem (I have lots of problems but that’s a different forum;~):
Suppose I have the extensions defined in a header file where I do:
#include “glext.h”
PFNGLMULTITEXCOORD1FARBPROC glMultiTexCoord1fARB = NULL;
etc…
followed by:
void initMultiTexture()
{
glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC) wglGetProcAddress(“glMultiTexCoord2fARB”);
glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress(“glActiveTextureARB”);
glClientActiveTextureARB= (PFNGLCLIENTACTIVETEXTUREARBPROC) wglGetProcAddress(“glClientActiveTextureARB”);
}
Then, I initialize the extensions I want by initMultiTexture(); in main.cpp, for example
Now, I have a world class and a character class that also use extensions. How do I define the extension functions in these files without having the compiler seeing function redefinitions?
Thanks for the help,
Boris
[This message has been edited by Boris008 (edited 03-04-2002).]