Hi Tatsuhiro, You changes are only going to break lots of systems out there so there is no way I'm going to apply it. It's also the wrong way to go about managing this feature disablement. The GLExtensionDisable is the correct way to go about it. It might be that we want to extend this infrastructure to handle configuration files for different hardware/drivers rather than just env vars.
Robert. On Thu, Nov 13, 2008 at 5:26 PM, Tatsuhiro Nishioka <[EMAIL PROTECTED]> wrote: > Hi Robert, > > Here's Texture.cpp that gives us what I explained in my last post to > osg-users on this. > I also added GeForce 7300GT driver bug fix (inside #ifdef __APPLE__ #endif > closure). > I tested this file on iMac/GeForce 7300GT and it worked fine. > > If this works on Window and Linux, then I'll change other files for the same > purpose. > > Best, > > Tat > > Tat wrote on osg-users on Wed, Nov 12, 2008 at 1:23 PM: >> Sure, no problem at all. >> >> However, I'm now doing further investigation for simpler code to do >> the same thing. I'm wondering if version check is actually needed for >> each extension availability check. Since OpenGL must be upward >> compatible, you can call only isGLExtensionEnabled for that purpose. >> The extensions can be accessible as extensions even these were >> promoted to be OpenGL core functionalities in a certain version. >> >> So, I'll try cutting all the version comparisons in checking extension >> availability from entire osg classes for doing what I mentioned in the >> last post. Plus, I'll also add a workaround to avoid crash on >> Macs/GeForce 7300GT. >> >> Only one thing I'm worried is that I don't know if there are some >> exceptional OpenGL drivers that don't have the compatibility written >> in OpenGL specification. In that case, we need to think about another >> way to achieve this issue. >> >> Anyway, I'll post the files to the submission list when it's done. >> >> Tat >> >> p.s. >> If you want me to post the workaround for GeForce separately from the >> ones with extension disable/enable thing, I'll do so (since these are >> for different purposes). >> >>> From: "Robert Osfield" <[EMAIL PROTECTED]> >>> >>> HI Tat, >>> >>> Could you post the whole modified file to osg-submissions I can then >>> review it their alongside the rest of the code submissions. >>> >>> Thanks, >>> Robert. >>> >>> On Sun, Nov 9, 2008 at 5:38 PM, Tatsuhiro Nishioka >>> <[EMAIL PROTECTED]> wrote: >>>> Hi there, >>>> >>>> I received some crash reports on FlightGear/OSG from a user who uses >>>> nVidia 7300GT on Macs. >>>> Debugging on an iMac gave me that hardware mipmapping on its driver caused >>>> the crash. >>>> so I once made a "fix-it-only-for-this-issue" kinda patch that simply >>>> disable hardware mipmapping when >>>> the renderer is "NVIDIA GeForce 7300GT OpenGL Engine, " and that actually >>>> fixed the problem. >>>> (see http://www.mail-archive.com/[EMAIL PROTECTED]/msg18674.html >>>> for more detail on this problem and the patch.) >>>> >>>> However, I'm wondering if users can disable hardware extensions to avoid >>>> such problems. >>>> I tried >>>> OSG_GL_EXTENSION_DISABLE="GL_SGIS_generate_mipmap;GL_EXT_framebuffer_object" >>>> but nothing happened. >>>> Taking a look at Texture.cpp tells me you can never disable hardware >>>> extensions if your OpenGL driver version >= 1.4 (or 2.0) >>>> It calls isGLExtensionSupported to check if an extension is supported but >>>> these will never called. >>>> For example, the following code is for checking hardware mipmapping >>>> extension: >>>> >>>> _isGenerateMipMapSupported = (strncmp((const >>>> char*)glGetString(GL_VERSION),"1.4",3)>=0) || >>>> >>>> isGLExtensionSupported(contextID,"GL_SGIS_generate_mipmap"); >>>> >>>> This means that isGLExtensionSupported will never be called when >>>> GL_VERSION >= 1.4, resulting that you cannot disable it >>>> since environment variable is evaluated in isGLExtensionSupported. >>>> >>>> Attached is the patch to make hardware extensions disabled using the >>>> environment variable. >>>> I'm not so sure on the real purpose of the OR logic in the if statement >>>> above, but it is good to give users a choice. >>>> Can anyone test this and check if this is a right solution? > > > > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
