Hi Robert,

On Dec 16, 2008, at 4:39 AM, Robert Osfield wrote:

> Hi Tatsuhiro,
>
> On Mon, Dec 15, 2008 at 6:16 PM, Tatsuhiro Nishioka
> <[email protected]> wrote:
>> Thanks for your answer. I understand the base concept, but I got confused 
>> with your answer since the same file contains
>> some workarounds that violates your policy:
>
> He who is observant get a gold star ;-)
>
>> These are the similar kinds of workarounds for specific driver bugs, I 
>> believe.
>> Moreover, the Radeon workaround is not necessary on my MacBook Pro (Radeon 
>> 1600X).
>> I added the workaround for GeForce 7x00 on Mac since the files already has 
>> such "hacks."
>> If my workaround is not appropriate, then so are these.
>
> These workarounds are inappropriate as well, and it's my wish to start
> purging such hacks from the core OSG.  For the reason you cite
> yourself - such hacks aren't are irretrivable, once you move to a
> driver that fixes the problem you can't fix your application, your
> stuck with features disabled for no reason other than a historical
> app.
>
> So rather than add to number of hacks in the OSG, my wish is to not
> keep repeating the same mistake with more of the same.

I totally agree with you on this.
Only the problem behind this is that it takes a bit longer to wait for driver 
bug fix.
but we can have some other way to go around to it.

>>> To enable
>>> this to work I think the right thing to do is tweak the extension
>>> query scheme so that the calling code passing in the GL version number
>>> as well as the extension strings this way we can handle the extension
>>> disable checking at the same time.  I've investigate this at my end.
>>
>> I don't get this part, how exactly can I do this?
>> Could you elaborate this a bit more?
>
> I can even provide some code :-)
>
> I've implemented a new  osg::isGLExtensionOrVersionSupported(..)
> method that takes both the extension name string and the minimum
> OpenGL version required, this methods also checks the extension
> disable string and disables the extension whether it's been enable
> viable extension or by version number.  The code in action is:
>
>    _isGenerateMipMapSupported =
> isGLExtensionOrVersionSupported(contextID,"GL_SGIS_generate_mipmap",
> 1.4);
>
> I've just rolled this new method out into Texture.cpp so far, but for
> your purposes this should be sufficient.  These changes are now
> checked into OSG svn/trunk.
>
> Then to disable this extension try:
>
>  setenv OSG_GL_EXTENSION_DISABLE GL_SGIS_generate_mipmap
>
> This wil do a blanket disable of this extension, you can put the GL
> render string name in front of this to make sure that only the
> hardware of interest you disable the extension on.  If the rules
> required to single out when you need to apply the disable then you'll
> need to do this in your app then decide whether the set the above
> string.  You can set the string programatically via:
>
>  osg::setGLExtensionDisableString("GL_SGIS_generate_mipmap");
>
> There is examples of this in the include/osg/GLExtensions header.
>
> Could you try this out and report how you get on.  Hopefully we'll be
> able to get this working this way, and then work out a high level
> scheme for managing this.   It's also be worth use changing a few more
> parts of the OSG to use this new function as well - but only we know
> it's effects.



Sure, but unfortunately I don't have Macs with GeForce 7x00GT.
I'll svn up and rebuild osg.framework, maybe tomorrow, and ask some users for 
test.

I'll also try to find a means of detecting such hardware in either FlightGear
or its launcher. We need to find a way to fix this problem anyway.

Best,

Tat


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to