Hi Sebastian,

SMesserschmidt  wrote:
One thing which is definitely an error:
You are never setting the type of the shaders.

Thank your for pointing that out but I'm sure that's not the problem. I'm using 
osgDB::readShaderFile to load the shaders sources from disk. The function uses 
osgDB::Registry to to load the appropriate ReaderWriter plugin for the filename 
extension, and this plugin then handles the request to read the specified file. 
This sets the type of the shaders automatically based on the files' extensions 
(which are .vert, .geom, and .frag in my case).

Source: OpenSceneGraph documentation 
(http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a01311.html#a7fea36cb4795ed66d45e7034169d6750).
Ok. I'd usually don't rely on something like this ;-)

The other problem is with your shaders:
You are using GL3 shaders without compatibility mode, hence there might be a missing binding.
try
#version 330 compatibility
and use gl_Vertex in your vertex shader.

Your simple geometry shader lacks a EndPrimitive too.

Apart from this I did not manage to get your geometry shader to output anything useful, so maybe there is some error in here too. I'd start by constructing a single triangle to see if the data is passed correctly and then add the rest.

Cheers
Sebastian.




Cheers,
Ahmed

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





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

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

Reply via email to