Re: [Plib-users] Library Initialization
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-10-11 04:12:07
|
Elad Lahav wrote: > > OK, I have tried to exclude as many reasons as possible for this failure, > and this is what I got: > 1. Reinstalled RH 7, *BZZT*BZZT* WARNING! WARNING! You might want to downgrade your gcc to something that works. RedHat are coming in for a lot of flak over their decision to ship a relatively poorly tested beta version. > with the original kernel and libraries, and still got > the same GL context issue... Well - I'm rather unconvinced - I don't think this is a PLIB problem. > 2. Compiled other, non-plib, GL-dependant programmes. They seemed to work > fine. Well, that's interesting - but I *still* don't think it's a PLIB problem. The deal is that you really havn't run much PLIB code by this stage: The rule is that the first SSG function to be called MUST be ssgInit - and ssgInit must not be called until there is a valid OpenGL rendering context. The very first line of that function is a call to glIsValidContext whose very first line is to ask X if there is a valid rendering context. Immediately upon return, you are getting that error message saying that there isn't a valid context. So, if FGFS has a valid rendering context in the line immediately before the very first ever call to a PLIB function (well, a PUI, FNT or SSG function at least) - then you could insert a glXGetCurrentContext in the line just before ssgInit is called and it would return some non-NULL value. Then you are telling me that sometime in the next three lines, PLIB somehow corrupts that context and then - testing it a second time - get's NULL back? I don't believe that. Ergo FGFS did not have a valid context before calling ssgInit - so it's FGFS's fault. I can't see a flaw in that reasoning. You may not previously have seen this message with earlier versions of PLIB because we were not doing the check - now we are, we may have uncovered a FGFS error of some kind....I don't know. > 3. When trying FlightGear, I have compiled all libraries and programmes > (plib, SimGear and FlightGear), on the same machine, with the same compiler, > at the same time (so you can't even blame it on weather changes...;-) > Anything else? Well, I think you should hack into plib/src/ssg/ssg.cxx, see where it says 'glXGetCurrentContext' in 'glIsValidContext' - print out the value that glXGetCurrentContext returns. Also stick a printf inside 'ssgInit' so we know that it is truly what called glIsValidContext. Now, put a check for glXGetCurrentContext into FGFS in the line before you call ssgInit - and you'll know for sure. Incidentally, a similar test for a valid OpenGL context is made in PUI's puInit (which FGFS is presumably also calling)...and also in the FNT font loader. *PRESUMABLY* those are being called after ssgInit - so we don't see them complain. I *suspect* the RedHat C++ compiler - it's been implicated in several problems in other projects this week. If I'd bought a copy of RH 7, I'd be demanding my money back. They did a VERY irresponsible thing and use poor package maintainers are suffering the consequences. That gets me somewhat upset. I can only imagine what the GCC maintainers are going through. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |