Attached is source code that demonstrates OSG rendering using an OpenGL 3.x
context. At the bottom of the source is a comment block describing how to build
OSG for OpenGL 3.x.
I hope this is helpful.
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
I'd be surprised if there was much difference. I would guess for a modern GPU, GL2 vs
GL3 is purely a matter of semantics.
--
Chris 'Xenon' Hanson, omo sanza lettere. Xe...@AlphaPixel.com http://www.alphapixel.com/
Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting.
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
On 31 December 2011 22:05, Paul Martz <pma...@skew-matrix.com> wrote:
> Happy New Year, everyone --
>
> Attached is source code that demonstrates OSG rendering using an OpenGL 3.x
> context. At the bottom of the source is a comment block describing how to
> build OSG for OpenGL 3.x.
Thanks for this. Do you feel it'd be appropriate to have this as an
one of the OpenSceneGraph/examples?
Cheers,
Robert.
Hi Robert -- I do think it would be good to have it available, so if you'd like
to include it in the examples, please do. I've attached an updated version that
cleans up the code and comments a little bit. I'll forgo any kind of copyright
and donate the code to the public domain (noted at the top of the file).
I presume this would need to be added in such a way that it only builds for GL3,
and there are a few different ways to do that. I'll leave the decision up to you
to set a precedent for how GL3-specific examples should be added.
-Paul
I am just working on merging your gl3example.cpp into svn/trunk and
have renamed it osgsimplegl3 as it's a very bare bones little viewer
example. I have also added the following lines just before the
viewer.run() so that the example works fine on GL2 etc. builds.
// for non GL3/GL4 and non GLES2 platforms we need enable the osg_
uniforms that the shaders will use,
// you don't need thse two lines on GL3/GL4 and GLES2 specific
builds as these will be enable by default.
gc->getState()->setUseModelViewAndProjectionUniforms(true);
gc->getState()->setUseVertexAttributeAliasing(true);
Is this OK?
Robert.
On 2/9/2012 8:34 AM, Robert Osfield wrote:
> Hi Paul,
>
> I am just working on merging your gl3example.cpp into svn/trunk and
> have renamed it osgsimplegl3 as it's a very bare bones little viewer
> example. I have also added the following lines just before the
> viewer.run() so that the example works fine on GL2 etc. builds.
>
> // for non GL3/GL4 and non GLES2 platforms we need enable the osg_
> uniforms that the shaders will use,
> // you don't need thse two lines on GL3/GL4 and GLES2 specific
> builds as these will be enable by default.
> gc->getState()->setUseModelViewAndProjectionUniforms(true);
> gc->getState()->setUseVertexAttributeAliasing(true);
>
> Is this OK?
>
> Robert.