Hi Jerome,

I haven't tried GLSL on older hardware so I can't provide an directly
wisdom.  Does your driver support OpenGL 2.0?  If so then fragment
shaders should be supported, even if only in software.

As for osg::Program, like OpenGL it supports having just a vertex
shaders or just a fragment shaders as well as both,  so if you don't
attach any fragment shaders then the normal fixed function pipeline
should be used.  Since I haven't tested against older hardware/drivers
I can't say whether the code will require all extension to be present
even if it doesn't need it.  If this is the case then osg::Program
could probably be refactored to allow this, or simply just subclass
from osg::Program.

The other alternative is simply to buy a new card for your machine,
you'll be able to pick up a GLSL supporting card pretty cheaply, even
the low end ones will kick the 4200's butt in performance as well as
features.

Robert.

On 11/29/06, Jerome Jeannin <[EMAIL PROTECTED]> wrote:
Hi everyone,

I have some question about the way to use GLSL vertex shader in OSG.

As far as I know, osg::Program can be used only if those OpenGL extension
are supported :
GL_ARB_shader_objects, GL_ARB_vertex_shader, GL_ARB_fragment_shader and
GL_ARB_shading_language_100 (regarding to GL2Extensions::isGlslSupported)

On some hardware (like my TI4200), GL_ARB_fragment_shader is not available,
so I can't use osg::Program. I agree that Glsl is not fully supported, but
it would support Glsl vertex shader.

So, what is the good way for me to use vertex shader ?

- using osg::VertexProgram rather than osg::Program ? (but ARPvp is not so
fun to my eyes)
- extend osg::Program to a less restrictive one ?
- extend osg::Geometry/Drawable and write my own drawImplementation to
support my vertex shader ?

Thanks,

Jérôme


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to