Sign in to follow this  
golgoth

wglGetProcAddress

Recommended Posts

golgoth    100
Well beside SDL and Glee i m trying to initialise those in a header file: PFNGLACTIVETEXTUREARBPROC glActiveTextureARB; PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB; or PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL; PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB = NULL; I always get: error C2440: 'initializing' : cannot convert from 'void (__stdcall *)(GLenum)' to 'int' This conversion requires a reinterpret_cast, a C-style cast or function-style cast everything i tried to load the gl extension failed... I m going nuts... I ll apreciate a sample if it exist... but any help will do!! Thx

Share this post


Link to post
Share on other sites
ade-the-heat    163
Just found similar on a download I have here at work, this works fine and is slightly different to yours:

in the h file
=============
// Here are the multitexture function prototypes
typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC)
(GLenum target, GLfloat s, GLfloat t);

// Here we extern our function pointers for
extern PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;


Then in the cpp file use:
========================
glMultiTexCoord2fARB= (PFNGLMULTITEXCOORD2FARBPROC)
wglGetProcAddress("glMultiTexCoord2fARB");


Then use as normal...
After this answer you can "rate me" - I'm negative at the moment but haven't asked a dumb question in ages !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this