Geometri shader, initial support

This commit is contained in:
Paolo Cignoni 2008-10-08 14:00:32 +00:00
parent b6d7e548b2
commit 2da37bd5f7
1 changed files with 15 additions and 1 deletions

View File

@ -13,7 +13,8 @@ public:
typedef enum
{
VERTEX,
FRAGMENT
FRAGMENT,
GEOMETRY
} ShaderType;
Shader(void) : GLObject(), Bindable()
@ -31,6 +32,7 @@ public:
{
case Shader::VERTEX : t = GL_VERTEX_SHADER; break;
case Shader::FRAGMENT : t = GL_FRAGMENT_SHADER; break;
case Shader::GEOMETRY : t = GL_GEOMETRY_SHADER_EXT; break;
default: return;
};
this->objectID = glCreateShader(t);
@ -153,6 +155,18 @@ public:
}
};
class GeometryShader : public Shader
{
GeometryShader(void) : Shader()
{
}
ShaderType Type(void) const
{
return Shader::GEOMETRY;
}
};
#if 0
class Program;