00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef VRS_GL2_GEOMETRYSHADEROBJECT_H
00024 #define VRS_GL2_GEOMETRYSHADEROBJECT_H
00025
00026 #include <vrs/opengl/openglconfig.h>
00027 #include <vrs/opengl/gl2/shaderobject.h>
00028
00029 namespace VRS {
00030 namespace GL2 {
00031
00033 class VRS_CORE_API GeometryShaderObject : public ShaderObject {
00034 public:
00035 VRS_TYPEINFO(GeometryShaderObject, ShaderObject);
00036 VRS_SERIALIZABLE(GeometryShaderObject);
00037
00038 GeometryShaderObject(const std::string& source, GLenum inputType, GLenum outputType, GLuint maxOutputVertices) :
00039 ShaderObject(source), inputType_(inputType), outputType_(outputType), maxOutputVertices_(maxOutputVertices) { }
00041
00042
00043
00044
00045
00046
00047
00048 virtual GLenum type() const { return GL_GEOMETRY_SHADER_EXT; }
00050
00051 void setInputType(GLenum inputType) { inputType_ = inputType; }
00052 void setOutputType(GLenum outputType) { outputType_ = outputType; }
00053 void setMaxOutputVertices(GLenum maxOutputVertices) { maxOutputVertices_ = maxOutputVertices; }
00054
00055 GLenum inputType() const { return inputType_; }
00056 GLenum outputType() const { return outputType_; }
00057 GLuint maxOutputVertices() const { return maxOutputVertices_; }
00058
00059 protected:
00060 GeometryShaderObject() { }
00061
00062 private:
00063 GLenum inputType_;
00064 GLenum outputType_;
00065 GLuint maxOutputVertices_;
00066 };
00067
00068 }
00069 }
00070
00071 #endif // VRS_GL2_GEOMETRYSHADEROBJECT_H