PDA

View Full Version : Strange behavior... It depends by the compiler?



Teofuzz
01-08-2001, 02:21 PM
umph... hope I'll be able to explain.
I use 3dfxvgl.dll renamed to opengl32.dll to use hw accel. The 1st strange thing:
1) quake3 works
2) nehe's demos work
3) my app doesn't works
In depth, my app sets up properly the device context, rendering context, ecc... but when it must start to draw on the screen, nothing appens. On the screen remains the image of the windows that where there before. But the app is still running because if I hit ESC the program exits normally. Note that the same happens with the code of Nehe's lesson1, identical.

Now the 2nd strange thing: if I copy the file opengl32.dll by micro$oft, all works.

Why this?
The compiler? All happens only on my apps.

Thanks
Fuzz

DFrey
01-08-2001, 02:49 PM
You really should not rename 3dfxvgl to opengl32. Instead you should explicitly load it (or opengl32 if 3dfxvgl is not available)with LoadLibrary, and get the procedure addresses. This way your program will work with 3dfxvgl (for people with Voodoo cards) or opengl32 (for people that don't have Voodoo cards).

Teofuzz
01-08-2001, 03:13 PM
Eh, I know...
In fact I spent last two days trying to use LoadLibrary hoping this could resolve the problem...
It does the *same* *identical* thing.
First I thought it could be SwapBuffers... but when loading the ms opengl all worked, I finished my resources!

Fuzz