Ok, I don’t know what language that is, but I think I understand that much that you declare glAcriveTextureARB as a long integer variable, am I correct?
If so, I think this can be the problem. glActiveTextureARB shouldn’t be a variable, but a pointer to a function. wglGetProcAddress returns a pointer to the function. You need to declare glActiveTextureARB as a poiter to a function, and maybe this will do.
Just a tip, but maybe declaring it as long interger is correct, I don’t know what language it is, and nor do I know how it works
Please help me ! The upper code was wrong in some kind.
OpenGl programmers, you should be able to help me now :
THIS WORKS IN MY PROGRAM :
---- This function is in C ----
WINGDIAPI void APIENTRY glLoadIdentity (void);
---- This function is in my VB language and DOES WORK !!! ----
Declare Function glLoadIdentity Lib “opengl32.dll” As Long
******************** Here starts my troubles ********************
---- This function is in C, okay ? ----
'typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target);
---- This crashes, why why why ??? ----
Declare Function glActiveTextureARB Lib “openGl32.dll” Alias “PFNGLACTIVETEXTUREARBPROC” (target As GLuint) As Long
(target As GLuint) has NOTHING TO DO ! It is the entry that is NOT found…
People ! What is the REAL name of the extensions ??? This seems to crash.
Ok, in C,
WINGDIAPI void APIENTRY glLoadIdentity (void);
declares a function called glLoadIdentity.
and,
typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum target);
defines a function type called PFNGLACTIVETEXTUREARBPROC.
So in C one would actually use,
PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
to first declare a function of that type, and then use wglProcAddress to assign that function its address. You’ll need to do something similiar in VB, but how, is beyond me.