From Stephane Lamoliatte, "Here is a patch wich improves the support for geometry shaders in OpenSceneGraph.
It adds new PrimitiveSet constants for the specific geometry shader primitive types : - LINES_ADJACENCY - LINE_STRIP_ADJACENCY - TRIANGLES_ADJACENCY - TRIANGLE_STRIP_ADJACENCY It also adds some missing features to the glsl reader plug'in. "
This commit is contained in:
@@ -17,6 +17,7 @@ class ReaderWriterGLSL : public osgDB::ReaderWriter
|
||||
supportsExtension("gl","OpenGL Shader Language format");
|
||||
supportsExtension("frag","OpenGL Shader Language format");
|
||||
supportsExtension("vert","OpenGL Shader Language format");
|
||||
supportsExtension("geom","OpenGL Shader Language format");
|
||||
supportsExtension("glsl","OpenGL Shader Language format");
|
||||
}
|
||||
|
||||
@@ -71,6 +72,7 @@ class ReaderWriterGLSL : public osgDB::ReaderWriter
|
||||
// set type based on filename extension, where possible
|
||||
if (ext == "frag") shader->setType(osg::Shader::FRAGMENT);
|
||||
if (ext == "vert") shader->setType(osg::Shader::VERTEX);
|
||||
if (ext == "geom") shader->setType(osg::Shader::GEOMETRY);
|
||||
}
|
||||
}
|
||||
return rr;
|
||||
|
||||
Reference in New Issue
Block a user