Re: [osg-users] A patch to enable making hardware extensions disabled in Texture.cpp
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). On 11/10/08, Robert Osfield [EMAIL PROTECTED] wrote: 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? Best, Tat ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] A patch to enable making hardware extensions disabled in Texture.cpp
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? Best, Tat ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] A patch to enable making hardware extensions disabled in Texture.cpp
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? Best, Tat Texture_disable_extensions.diff Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org