GL Extension problem

Started by
2 comments, last by orbano 20 years, 3 months ago
Hello everyone! May problem is that i can not use any of the OpenGL extensions. I tried many import libraries (extgl,glATI,code from nehe tute), but failed. The first problem is, that they say, my HW does not support the extension (tried multitexturing end vertex buffer objects). I have a radeon8500 and tried it on a 9700 model too. So i tried to use the extension without any check, but at the place of the first extension function call, my program caused access violation at 0x00..5 Im using Visual C++ 6.0 Thanks for your help! "Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin
"Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin
Advertisement
which drivers are you using?
Are you sure you''re getting a hardware context?

Grab the OpenGL extension viewer from http://www.realtech-vr.com/classic/ it might give you a better idea of whats going on
im using the latest catalyst drivers. i am updating a working 3d engine with these features...
thnx i will try this... it shows that these extensions are supported. then what is the problem? could you give me a simpley wayx for importing these functions? (it was my first try doing this)
i have fixed the problem, now my programme finds that ARB_vertex_buffer_object is enabled, but nothing is drawn (I used the code taken from the nehe VBO tutorial.)

[edited by - orbano on January 6, 2004 10:55:26 AM]
"Knowledge is no more expensive than ignorance, and at least as satisfying." -Barrin
If it does not crash anymore my post is probably useless, I wrote it just in the case a day someone will find it useful...

When using extensions, take care where you put your pointer-to-function definition and declarations. There are some chances the pointers will get compile-unit specific. This means that they are fetched in a source file compiled from a link unit and used by a compiled file from another link unit.

There are some cases in which this looks to work just fine however it still crashes because the pointers are instantiated multiple times (one for each link/compile unit).

Usually, the best way to detect this is to init all pointers to a known address. I usually set them initially to NULL. Some linux kernel pointers use address 0xdeadbeef which is very cool. If you get this address but your pointers looks fine, then they are probably getting multiple instantiations - consider it some sort of name space.

Fixing this - as you''ll have guessed - is pretty easy. Declaring pointers as static and defining them (instead of just declaring) is usually enough to avoid this problem.


Back on the subject: this does not apply here since errors of this kind usually crash the program however, maybe someone will find this useful anyway.

Previously "Krohm"

This topic is closed to new replies.

Advertisement