mp3butcher wrote:
> Hi,
> 
> What do you refer to by "modern OpenGL features"?
> Personally, I would say that  avaibility of GL features where related to 
> GLContext version. 
> However I always use compatiblity profile and not core profile, so don't have 
> experience with coreprofile in osg.
> Can you tell me why you would require core profile in osg?
> 
> PS: the code you post is not enough to be a submission ... I think the best 
> for code review would be a patch against  svn trunk (svn diff> my.patch)
> 
> 
> heandreas wrote:
> > Hi,
> > I am currently porting an application so that it uses the OpenGL core 
> > profile, mainly in order to gain access to modern OpenGL features under OS 
> > X. I had to make some changes to osg so that it does not use deprecated 
> > functions. However, the changes are not OS X specific (in fact I tested 
> > only Windows so far).
> > 
> > Texture::getModeUsage now only adds the texture mode if 
> > FIXED_FUNCTION_AVAILABLE is defined
> > PolygonMode now can still be used to achieve wireframe rendering in GL3 
> > core profile (previously it was ignored completely)
> > State::initializeExtensionProcs now only queries GL_MAX_TEXTURE_COORDS if 
> > FIXED_FUNCTION_AVAILABLE is defined
> > Texture::applyTexParameters: CLAMP is translated to CLAMP_TO_EDGE if 
> > OSG_GL3_AVAILABLE is defined
> > Texture::applyTexParameters: GL_DEPTH_TEXTURE_MODE_ARB is not set if 
> > neither GL1 nor GL2 is available
> > 
> > 
> > These changes eliminate the warnings and errors I was getting and my 
> > applications seems to work. So far, I only tested under Windows, but I will 
> > try out OS X and Linux soon. One thing that is missing is VAO support, I 
> > simply bind a VAO using QT right before rendering as a workaround.
> > 
> > I also made a change that is completely unrelated to core profile 
> > compatibility in State.cpp. Previously, State created a GLExtensions object 
> > in its constructor and deleted it in its destructor. It also called 
> > GLExtensions::Set when creating and deleting the extension object, which in 
> > my opinion is problematic because it may delete an extension object that 
> > was not created by the State object. I changed State so that it simply uses 
> > GLExtensions::Get(_contextID, true) to get its extension object and removed 
> > the calls to GLExtensions::Set. I did this because I had a strange and 
> > unpredictable problem with the extension object in another part of my code 
> > and wanted to simplify the initialization process.
> > 
> > My patch is based on the current github repository (osg116).
> > 
> > My application also uses osgText, which required much more changes to work 
> > with the core profile. Most notably I had to change the Glyph class so that 
> > it uses VBOs. It was also necessary to change the font texture format, 
> > because GL_ALPHA is deprecated. You probably do not want to merge my 
> > changes to osgText yet, because additional testing is required under 
> > different platforms. I could submit the files later after additional 
> > testing.
> > 
> > Cheers,
> > Andreas
> 


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62287#62287





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

Reply via email to