damn my voodo2

Started by V01D, 03 April 2004, 05:13:09

Previous topic - Next topic

V01D

I have a problem with MesaFX. I recently downloaded Mesa Sources and tried to compile MesaFX. It was chaotic and it took me a big effort. Finally I could just compile it in debug. When I used the opengl32.dll (mesafx dll) inside my directory it popped up a blank message box with title Error.
The other day I noticed I didn't needed to compile it myself and use the lib and headers... I read somewhere that mesafx could be used as a replace for the opengl32.dll driver in some games. Because of that the only possibilty that I thought of is that using standard gl headers and libs, at runtime the correct dll would be used and everything should work OK. The only compiled version I could use (and that works for me) is the MesaFX 6.1 (I noticed that glide3x.dll and fxmemmap needed to be in the same DIR, it didn't worked when copying it into windows/system).
Now onto the problem: my app (compiled with mesa headers and normal opengl libs) crashes every now and then (it can go perfectly fine but when I start it again it crashes, I can't seem to know whats makes it not to crash) when calling wglDeleteContext. I first do wglMakeCurrent(NULL,NULL) and, after that, the wglDeleteContext crashes the app (but as I said, every once in a while). I tried to call wglDeleteContext first and then wglMakeCurrent (i looked into CrystalSpace engine code, they did it like that) and now it crashed again on wglDeleteContext (so this is the problematic function).
I have voodoo2, win98. HELP!
PS2: I had problems while loading the 3dfxvgl.dll in the past (before using mesa). When I called FreeLibrary(lib); it crashed... but again... not always...
This makes me wonder if it's in any way related the the wgl problem.
THANKX!
 

dborca

QuoteOriginally posted by V01D

I have a problem with MesaFX. I recently downloaded Mesa Sources and tried to compile MesaFX. It was chaotic and it took me a big effort. Finally I could just compile it in debug. When I used the opengl32.dll (mesafx dll) inside my directory it popped up a blank message box with title Error.
The other day I noticed I didn't needed to compile it myself and use the lib and headers... I read somewhere that mesafx could be used as a replace for the opengl32.dll driver in some games. Because of that the only possibilty that I thought of is that using standard gl headers and libs, at runtime the correct dll would be used and everything should work OK. The only compiled version I could use (and that works for me) is the MesaFX 6.1 (I noticed that glide3x.dll and fxmemmap needed to be in the same DIR, it didn't worked when copying it into windows/system).
Now onto the problem: my app (compiled with mesa headers and normal opengl libs) crashes every now and then (it can go perfectly fine but when I start it again it crashes, I can't seem to know whats makes it not to crash) when calling wglDeleteContext. I first do wglMakeCurrent(NULL,NULL) and, after that, the wglDeleteContext crashes the app (but as I said, every once in a while). I tried to call wglDeleteContext first and then wglMakeCurrent (i looked into CrystalSpace engine code, they did it like that) and now it crashed again on wglDeleteContext (so this is the problematic function).
I have voodoo2, win98. HELP!
PS2: I had problems while loading the 3dfxvgl.dll in the past (before using mesa). When I called FreeLibrary(lib); it crashed... but again... not always...
This makes me wonder if it's in any way related the the wgl problem.
THANKX!
Actually, compiling MesaFX from CVS snapshot is as simple as compiling it from the latest official release. And it is mindlessly simple. But, as with all those opensource projects out there, RTFM. However, since I am responsible for the potential mess of the MesaFX driver, I might be able to help you.

First of all, I want to know which compiler did you used. Second, it is best to try and grab CVS from a week ago, since the heavy changes in the T&L engine affected the MinGW compilation. Not mentioning M$VC, which is worse.

Koolsmoky reported unstable binaries for M$VC, so I recommend sticking with gcc all the way (keep in mind Mesa's primary target is Linux). I guess Mesa might be silently tuned for gcc and I am too lazy and too uninterested in M$VC to look out those bugs.

Last, but not least, I don't do Windoze crap. So you'll have to figure out yourself the correct `wgl*' sequence.
Regards,
Daniel Borca

koolsmoky

I guess I'm suppose to be responsible for the Windoze crap.

The Mesa libs and headers are not required unless you're using a Mesa specific extension. If you're using MSVC for your opengl program, just include standard MSVC headers:
#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>

And link with standard MSVC libraries:
OpenGL32.lib
GLu32.lib
GLaux.lib

As Daniel said, if you still want to compile Mesa you should really stay away from MSVC. Stick with gcc, the Mesa gods' compiler of choice!

-KoolSmoky
 

dborca

Huh! I said _HE_ should deal with `wgl*'. And by windoze crap I mean anything windoze-related. Anything at all, not only the wgl interface of Mesa's.

Whomever is responsible for this or that is just a matter of choice, since we work on a volunteer basis. Letting other people sweat a bit won't hurt them.

Sorry, I don't want to be rude or mean, but I think OpenGL tutorials in windoze is beyond the scope of this forum. Why? Simply because there are better sites specially designed for this. Neon Helium!

Since the DLL works with many applications out there I suspect a coding error, rather than a flaw in the `wgl*' interface design. Feeling responsible for other people's code seems pretty awkward.
Regards,
Daniel Borca

koolsmoky

Daniel, no harm intended. V01D probably used my crappy MSVC makefiles to build MesaFX. Should I have asked you to remove the files or put signs that it's broken, it would have saved him the touble. That's what I was traying say.

-KoolSmoky
 

dborca

QuoteOriginally posted by koolsmoky

Daniel, no harm intended. V01D probably used my crappy MSVC makefiles to build MesaFX. Should I have asked you to remove the files or put signs that it's broken, it would have saved him the touble. That's what I was traying say.

-KoolSmoky
No prob, K! :)

Wow! Where are those damn M$VC makefiles again? [:0] they used to be there... but not today... [:p]
Regards,
Daniel Borca

V01D

Yay, thanx for the replies
First of all, YES I have Winblowz and M$VC (vc6, no sp, wich is worse)
But I guess that's not the problem since I'm using precompiled mesafx 6.1
My thoughts were that if the precompiled dll worked for almost every opengl based game out there it should work aswell for my app (without compiling it)
So I used the precompiled in put opengl32.dll (mesa's) and glide3x.dll and fxmemmap (I know I don't need this last one, it's a DX driver).
Second, I don't need any tuts on wgl, I just wondered why my app crashes when that function gets called. And when looking thru CrystalSpace sources I saw that they called DeleteContext before MakeCurrent(NULL,NULL) (the opposite order from any tut I saw, specially, Nehe's).
So... I don't know what to do with the dll?
I can't compile it because i need masm and I couldn't make my way thru all the .mak files mess (no offense, but honestly it's messy).
I won't give up to my voodoo2 until I get I newer one (I don't know when will that be)...
So If you could just give me a tip on what could wglDelete to crash
Or maybe i should call a more mesa specific wgl call? I really dunno
Thanx, and your help is apreciated
 

Sanek

heh guys, the new MESA release doesn't even work for me. All I'm getting is error initializing opengl mode n stuff (depends on the game). Counter-Strike works with older MESA release, but doesn't work with the new one, but thats no prob, I'm still sticking to WickedGL as it gives you much higher performance, just wanted to tell you...
Intel Celeron 433 MHz
128MB + 32MB RAM
40GB + 5.5GB HDD
ATI Rage IIc (poor D3D and OpenGL performance)
Dimond Monster 3D II 8MB 3D-Accelerator
Win98SE
Win2K Pro SP4 + Aston Shell 1.9.0
RedHat Linux 7.5
DirectX 8.1 (Win98)
FastVoodoo2 4.6 Driver Set
DirectX 9.0b (Win2K)
FastVoodoo2 4.0XP GE Driver Set

dborca

QuoteOriginally posted by V01D

I can't compile it because i need masm and I couldn't make my way thru all the .mak files mess (no offense, but honestly it's messy).
Heheheh! Might be! I usually compile it this way (once downloaded):
mingw32-make -f Makefile.mgw X86=1 FX=1
That's all folks! Messy? :) But this, of course... means that you use MinGW. [:p]
Regards,
Daniel Borca

dborca

QuoteOriginally posted by Sanek

heh guys, the new MESA release doesn't even work for me. All I'm getting is error initializing opengl mode n stuff (depends on the game).
Sorry, but "n stuff" doesn't help!

Anyway, the driver interface is basically the same for 5.1 as for new MESA. The wgl file hasn't changed at all. There was a bug (one that I knew of) in new MESA, but that was not in the interface. So, could you be more explicit please?

QuoteCounter-Strike works with older MESA release, but doesn't work with the new one, but thats no prob, I'm still sticking to WickedGL as it gives you much higher performance, just wanted to tell you...
Thanks for sharing that bit of knowledge! :D We just wanted to know that... [:p]
Regards,
Daniel Borca