Hi David, On 2 March 2012 11:14, David Garcia <[email protected]> wrote:
> Warning: TexGen::apply(State&) - not supported. > > Warning: Material::apply(State&) - not supported. > > Warning: TexGen::apply(State&) - not supported. > > Warning: detected OpenGL error 'invalid enumerant' at after > RenderBin::draw(..) > > > None of the TexGen and Material state attributes are supported by core > GL3 so using these state attributes in the scene graph driving a GL3 > application is inappropriate. > > Looking at the osgsimplegl3 example it doesn't itself create a Material or TexGen so I think these inappropriate StateAttribute are part of the scene graph you are loading. Could it be cow.osg by any chance :-) What this application should do to handle models with inappropriate StateAttribute is debatable - the example is supposed to be simple and deleting all unsupported StateAttribute would be rather long winded. To do so we'd need some kind of mechanism built into the core OSG, but once we do have a full blown shader composition system these StateAttribute will no longer be unsupported but will have their own shaders, so longer term this issue will should be moot. Perhaps what would be best would be to add a command out an output line from the osgsimplegl3 example explaining the nature of these warnings if they appear. > OpenGL defines CGL functions. I will check later today if it is required. I won't merge any changes till I've heard back from you, I'd like to avoid lots of submissions thrashing the same code over as we try and home in on a final solution. > NSOpenGLProfileVersion3_2Core was introduced in the 10.7 SDK and > is defined > in:/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSOpenGL.h > > Is an enum with to values 0x1000 for the legacy version (pore OpenGL 3.0) > and 0x3200 for Open GL 3.2 > > Is this a > #define? Could we avoid having the #if defined(..) here and just > detect enable the 3_2 profile when the glContextVersion requests it? > I'm a bit concerned about the tying of version number to 3.2 and this > in turn requiring calling code to specifically ask for 3.2, but only > for OSX. I'd like to make things so they are more portable and > robust. For instance if one asks for 3.1 and only 3.2 is available it > should be safe to just level the 3.2 profile handle it. Only if one > asks for something greater than 3.2 might one decide to issue a > warning/error. > > > I have not be able to found another way to activate it without using this > enum. Rumors are that Mountain Lion will support extra values making the > code uglier. Another solution will be to use the value of the enum > (NSOpenGLPFAOpenGLProfile is 99 and NSOpenGLProfileVersion3_2Core is > 0x3200) but seems even less elegant. > Perhaps moving this discussion on to osg-users and try to catch the attention of other OSX devs to see what they think. I'd like to had a solution that will handle future revs of OSX and the SDK as well as be backwards compatible. >> In OS X is either legacy (pre OpenGL 3.0) or 3.2. A solution is to move the example to version 3.2 (upgrading maybe the functions to 1.5). As far as I > know Windows and Linux supports 3.2 out of the box. Not sure about older versions and/or why do you code the example using 3.1. > If applying your suggestion "...if one asks for 3.1 and only 3.2..." will also work. Changing the version to 3.2 in osgsimplegl3 would be a workaround but it doesn't feel like anything more than hiding a problem that really should be dealt with by the osgViewer OSX implementations i.e. they should be able to remap 3.1 to 3.2. It might be that we should refactor this version support. Robert.
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
