Archived

This topic is now archived and is closed to further replies.

razialx

Extensions Problem

Recommended Posts

Ok guys, i dunno if i am an idiot or what, but i have written an extension loader for opengl, right, but this is the problem, if i put the declarations for the functions in the header, anything else that links to it gets an error, and that sucks, it is the 2005 link error , already defined in object, i dunno what i am doing wrong, i am structuring everything like i always do, i would use teh functions provided by NVidia in the SDK, but it wont work either, argh, so if i put the function pointer declarations in a different file( the one with the fuction call to load them, ) then the other files can''t "see" the functions... suck

Share this post


Link to post
Share on other sites
heres the general idea
stick this in a header
extern PFNGLCOMBINERPARAMETERFVNVPROC glCombinerParameterfvNV;

in a cpp file stick this
PFNGLCOMBINERPARAMETERFVNVPROC glCombinerParameterfvNV;

+ in a function eg setup_opengl_extensions() put his
glCombinerParameterfvNV = (PFNGLCOMBINERPARAMETERFVNVPROC) SDL_GL_GetProcAddress("glCombinerParameterfvNV");

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites