Added .vert and .frag to list of accepted extension in the GLSL plugin

This commit is contained in:
Robert Osfield 2008-09-25 10:21:44 +00:00
parent 4cb79dcddf
commit 36409f8597
2 changed files with 6 additions and 4 deletions

View File

@ -220,6 +220,10 @@ Registry::Registry()
addFileExtensionAlias("dcm", "dicom");
addFileExtensionAlias("dic", "dicom");
addFileExtensionAlias("gl", "glsl");
addFileExtensionAlias("vert", "glsl");
addFileExtensionAlias("frag", "glsl");
#if defined(DARWIN_QUICKTIME)
addFileExtensionAlias("jpg", "qt");
addFileExtensionAlias("jpe", "qt");

View File

@ -14,14 +14,12 @@ class ReaderWriterGLSL : public osgDB::ReaderWriter
ReaderWriterGLSL()
{
supportsExtension("gl","OpenGL Shader Language format");
supportsExtension("frag","OpenGL Shader Language format");
supportsExtension("vert","OpenGL Shader Language format");
supportsExtension("glsl","OpenGL Shader Language format");
}
virtual const char* className() const { return "GLSL Shader Reader"; }
virtual bool acceptsExtension(const std::string& extension) const
{
return osgDB::equalCaseInsensitive(extension,"glsl") || osgDB::equalCaseInsensitive(extension,"gl");
}
virtual ReadResult readShader(std::istream& fin,const Options* options) const
{