View Full Version : extension loading over multiple classes
Can sombody tell me what i have to do to load an extension in a global header file and not having to redefine the function pointers over and over again for every unit that needs to use this the ARB-extension
so for example I define in that headerfile:
PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL;
and use an init funtion to load the wglGetProcAddress
thx in advance Makkero
05-19-2004, 01:52 PM
Write an initialization function that is called once at startup once that assigns this function pointer. You do not need to call getprocaddress more than once because the pointer should be global in scope if you have declared it correctly in the header.
I have defined the variable functions global in my header file (hope this is global enough). And I wrote an init function. In the initfunction he was able executen the assigned funtions but when i tried it outside in an other source file he gave me nullpointer exceptions while I have included the header file in that source file.
So i wrote the **** global like the standart way you write things global in the header file. But i think i need to do something extra. I tried to use 'extern' but it didn't resolve the problem
Can someone tell me what i need to do to get this to work.
thx in advance
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.