Re: [osg-users] Shaders with multiple views, possible?
Sebastian, Robert, Julien, Thanks a lot for your very clear answers, they help! Regards, Antoine -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72830#72830 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Why are my shaders not being used?
Hi Julien, Your answer was right and your help very much appreciated! PS: as an added note, the platform I use has a rather dull GPU and I had to downgrade Code: #define GLSL330(program) "#version 150\n" #program to Code: #define GLSL330(program) "#version 130\n" #program For it to work. Thanks a lot, Antoine. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72829#72829 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shaders with multiple views, possible?
Hi Antoine Reasons are undertandables through osg adaptation to across openGL history/evolution: In OpenGL2 there were builtins gl_XXX, in OpenGL3 these builtins have been removed. To make this evolution seamless osg brough you the osg_XXX uniforms that should be use if you're planning to deploy on GL3 core profile. Cheers arennuit wrote: > Hello Robert, > > Actually I don't get why OSG doubles the gl predefined variables > gl_ModelViewMatrix, gl_ModelViewProjectionMatrix... with osg equivalents. > Aren't the gl ones good enough? > > Kind regards, > > Antoine. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72828#72828 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shaders with multiple views, possible?
On 22 January 2018 at 13:58, Sebastian Messerschmidtwrote: > the gl_ built-ins are not part of the core-profile and thus are not > available in every version of GLSL. I'll add that osg_ModelViewMatrix etc. are designed as fallbacks when the gl_ versions aren't provided by GL-core profile and GLES2 - GLES3, If your are just using the default GL2 profile you can happily just use gl_ versions. If you want to write shader code portable between GL and GLES or beween GL and GL core profile then using the osg_ variants and telling the OSG to use these instead is done via osg::State::set*() methods as shown in the osgsimplegl3 example. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shaders with multiple views, possible?
Hi Antoine, the gl_ built-ins are not part of the core-profile and thus are not available in every version of GLSL. Cheers Sebastian Hello Robert, Actually I don't get why OSG doubles the gl predefined variables gl_ModelViewMatrix, gl_ModelViewProjectionMatrix... with osg equivalents. Aren't the gl ones good enough? Kind regards, Antoine. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72825#72825 ___ 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
Re: [osg-users] Shaders with multiple views, possible?
Hello Robert, Actually I don't get why OSG doubles the gl predefined variables gl_ModelViewMatrix, gl_ModelViewProjectionMatrix... with osg equivalents. Aren't the gl ones good enough? Kind regards, Antoine. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72825#72825 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shaders with multiple views, possible?
Hi Julien, I will follow Robert's advice but I keep your idea for other use cases. Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72824#72824 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shaders with multiple views, possible?
Hello Robert, Thanks this seems to be doing the trick ("seems" as I was not able to fully test yet because of some other code problem. Regards, Antoine -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72823#72823 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org