PDA

View Full Version : ARB constants



hoshi55
05-16-2002, 12:38 PM
since crappy windows still ships with openGL 1.1 i need to get some functions like glActiveTextureARB() driectly from the DLL which is okay. however, where do i get the necessary constants like GL_TEXTURE0_ARB etc from? i read on the net that there should be some file named glext.h containing these but i don't have that file. i know that GL_TEXTURE0_ARB should be 0x84C0 but when i run my program with that value it crashes. so, what do i need to use openGL 1.2 and 1.3 functions?

thx
eik

bakery2k
05-16-2002, 01:20 PM
http://oss.sgi.com/projects/ogl-sample/registry/

Omaha
05-16-2002, 04:26 PM
Hey, easy there; you've got a header file problem, and "crappy" windows doesn't ship with any header files. Maybe you mean "crappy" Visual Studio, which I will promptly defend as a very fine product.

Maan, everyone likes to jump on the Microsoft-slamming bandwagon.

hoshi55
05-16-2002, 10:59 PM
i did not just jump on the microsoft-bashing bandwaggon, i've bashed MS ever since win3.11 and i bash linux and macOS too whenever i feel the need for it.
ok whatever but it's just another MS strategy of pushing their own product (directX) instead of supporting a standard that has been around for years.

vincoof
05-16-2002, 11:42 PM
The value 0x84C0 can not crash your program. This constant will never change, because OpenGL is upward compatible.

If it crashes, that's probably because you didn't get the right pointer for function glActiveTextureARB, for instance if your card or drivers does not support multitexturing.

hoshi55
05-17-2002, 12:21 AM
you're right it must be an invalid function pointer... problem is, i do get *some* non-NULL function pointer but it seems to be broken. i can't even load something simple like glEnable at runtime and using it without crashing.

Bob
05-17-2002, 12:32 AM
You need a valid rendering context before you can start loading function pointers. Do you have a rendering context?

hoshi55
05-17-2002, 12:50 AM
sure thing.
i don't use wgl or xgl though but a function from theSDL library but that basically uses wgl and it has worked for other people but it fails on me..

V-man
05-17-2002, 05:00 AM
Whenever you need some update to some opengl file, or a demo program or documents:

goto

developer.nvidia.com
www.ati.com/developer (http://www.ati.com/developer)

oss.sgi.com/opengl (I think that's it)

and there are fine documents and demoes here to (developer section, main page)

Get the glext.h wglext.h from the nvidia or ati demoes! I will be posting a newer gl.h myself on my site.

V-man

Omaha
05-17-2002, 04:13 PM
Are you using wglGetProcAddress to initialize your function pointer?

hoshi55
05-17-2002, 04:31 PM
probably but i'm not sure. as i said i use the SDL library for cross-platform ProcAddressing but as far as i know it uses wglGetProcAddress under windows.
the strange thing is that i do get some pointer but it seems to be invalid because everytime i try to call this function my prog crashes.