View Full Version : HELP, can't use extensions !
Crusader
10-05-2000, 07:59 AM
Please help me ! Can't use the EXT routines !
--------
Option Explicit
Const GL_TEXTURE0_ARB = &H8078 '*** 0x8078 ***
Private glActiveTextureARB As Long
--------
glActiveTextureARB = wglGetProcAddress("glActiveTextureARB")
'*** The result is :
'*** glActiveTextureARB = 1767394448
glActiveTextureARB (GL_TEXTURE0_ARB)
--------
Then I have an error message that it is NOT found in DLL entries...
And I have an address AND my card supports it (RIVA TNT)
What have I done wrong ? Tell me please !
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 http://www.opengl.org/discussion_boards/ubb/smile.gif
Crusader
10-05-2000, 12:10 PM
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.
why is it so complicate to use the EXT ?
DFrey
10-05-2000, 02:12 PM
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. http://www.opengl.org/discussion_boards/ubb/rolleyes.gif
Crusader
10-08-2000, 10:04 PM
Thank you for your reply,
but here's ends my VB program, if think...
I can create "NEW" types with it, but it
is impossible to creates *specials* voids
like in C...
WinObject =/= CVoids ???
I don't think it would be easy as this
Noone will help me, I'm sure, GL_EXT is too advanced for VB, SO BE CAREFULL VB USERS IF I'M CORRECT...
Where can I convert to C easily ?
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.