Jump to content
  • Advertisement
Sign in to follow this  
golgoth

wglGetProcAddress

This topic is 5039 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
I believe they are already pointers. I don't know why golgoth's code doesn't work, it works on my machine.

Share this post


Link to post
Share on other sites
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!