Hi Paul, Congrats on getting GL3 context working ;-)
Is your code changes ready for merging or should I wait till you tie up the other parts? W.r.t selecting the GL3.x target, this is something I would put into the GraphicsContext::Traits structure as a GL version hint and then have it's default value selected by an env var or a prototype. Robert. On Sat, Nov 7, 2009 at 2:49 AM, Paul Martz <[email protected]> wrote: > Robert, to get this running, I needed current svn plus my Win32 context mod, > of course. But then I also needed to change a couple things relating to how > mipmapping works. In Texture.cpp, I had to modify hardwareMipmapOn to always > return GENERATE_MIPMAP for the GL3 case. I think that this is a good change > and ready to commit, but before I submit it I want to discuss this other > change... > > I also had to modify FrameBufferObject.cpp. Oddly, the FBOExtension > constructor is where OSG inits the address for glGenerateMipmap. This just > doesn't seem right, as mipmap generation has nothing to do with FBO. Worse, > the FBOExtension constructor is a no-op if GL_EXT_framebuffer_object is > unsupported, leaving all function pointers, including glGenerateMipmap as > NULL pointers. Of course GL_EXT_framebuffer_object is not in GL3; it is core > functionality. This brings up the larger issue of how to deal generally with > EXT/ARB extensions that are GL3 core features. Did you have to deal with > something similar in GL ES 2? I believe the glGenerateMipmap extension came in as part of the FBO submission as you can us them in conjunction with each other, then after than it's usage got adopted elsewhere in other submissions. Putting glGenerateMipMap in the Texture::Extensions class might be the best thing to do. > Anyhow, once I forced initialization for glGenerateMipmap, I managed to get > the cow up and running with my own "gl3cow" example, which is somewhat > different from your osgvertexattributes example. So I presume you are using a backwards compatible context as TexGen is a fixed function pipeline state. Or are you using your own uniform set up? W.r.t osgvertexattributes, at some point soon it'll probably be appropriate to rewrite this completely/discard it and replace it with a series of more appropriate GLES/GL3 examples. osgvertexattributes was really just my test bed for the vertex attribute aliasing and osg_ProjectionMatrix/osg_ModelView matrix uniforms - now this is all part of the core OSG and tesed the example doesn't have the same key role. I'm still using it a bit for GLES2 testing. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
