Re: [Plib-devel] Patches for FreeBSD
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2004-12-30 21:01:18
|
Bert Driehuis wrote: > One change should not be committed, which is the change that takes out > the call to glIsValidContext(). Not all patches in the ports tree are > desirable or even well thought out. We have had continual trouble with that. There are two conflicting aspects to this - both related to broken OpenGL implementations. 1) Some implementations don't correctly respond to glIsValidContext - notably one version of Mesa and one of ATI's drivers...probably both relate to an underlying DRI issue. In the presence of that bug, no PLIB applications will run because the library believes there is no valid GL context and therefore refuses to run. 2) Some implementations allow OpenGL applications to do (illegal) OpenGL calls (glGetString(...) is a common one) without a valid GL context. This allows application program writers to make the common error of trying to find out what kind of graphics card they have BEFORE they've opened a GL context...or perhaps do some other operation before the GL context is opened. Then, when they move their code to a different graphics card or driver, the formerly working program crashes. In order to prevent the latter problem causing a crash inside PLIB (and typically, a complaint to our developers for something we didn't do wrong) - I put checks for valid GL contexts in all of the PLIB initXXX() functions. Then, at least we know that PLIB isn't at fault. So - the problem is that if we leave out the glIsValidContext check then programmers make this VERY common mistake - and don't notice it for months or years later - and blame it on us. If we leave the glIsValidContext check in, then we sometimes fail on broken OpenGL implementations. I prefer to leave the check in there and try to get OpenGL fixed wherever possible. > By the way, I'm perfectly willing to take ownership of FreeBSD > portability issues if people think it'll help. My sourceforge id is > "driehuis". That would be very useful. Do you need developer access to PLIB? ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |