summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglshaderprogram.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-02-01 13:30:01 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-02-01 13:30:01 (GMT)
commitfe849f50ca83f50f6068b7d494cb228fae1d6309 (patch)
tree64ae403632763d4e5d576cd600de2561872032f5 /src/opengl/qglshaderprogram.h
parentc06c254cf208840f14c9e562cae976f1a61f0879 (diff)
downloadQt-fe849f50ca83f50f6068b7d494cb228fae1d6309.zip
Qt-fe849f50ca83f50f6068b7d494cb228fae1d6309.tar.gz
Qt-fe849f50ca83f50f6068b7d494cb228fae1d6309.tar.bz2
Geometry Shader support in QGLShaderProgram
Diffstat (limited to 'src/opengl/qglshaderprogram.h')
-rw-r--r--src/opengl/qglshaderprogram.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index 24ab986..face66e 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -66,7 +66,8 @@ public:
enum ShaderTypeBit
{
Vertex = 0x0001,
- Fragment = 0x0002
+ Fragment = 0x0002,
+ Geometry = 0x0004
};
Q_DECLARE_FLAGS(ShaderType, ShaderTypeBit)
@@ -88,6 +89,8 @@ public:
GLuint shaderId() const;
+ static bool hasShaders(ShaderType type, const QGLContext *context = 0);
+
private:
friend class QGLShaderProgram;
@@ -104,6 +107,14 @@ class Q_OPENGL_EXPORT QGLShaderProgram : public QObject
{
Q_OBJECT
public:
+ enum GeometryTypes
+ {
+ LinesWithAdjacencyGeometryType = 0xa,
+ LineStripWithAdjacencyGeometryType = 0xb,
+ TrianglesWithAdjacencyGeometryType = 0xc,
+ TriangleStripWithAdjacencyGeometryType = 0xd
+ };
+
explicit QGLShaderProgram(QObject *parent = 0);
explicit QGLShaderProgram(const QGLContext *context, QObject *parent = 0);
virtual ~QGLShaderProgram();
@@ -128,6 +139,17 @@ public:
GLuint programId() const;
+ int maxGeometryOutputVertices() const;
+
+ void setGeometryOutputVertexCount(int count);
+ int geometryOutputVertexCount() const;
+
+ void setGeometryInputType(GLenum inputType);
+ GLenum geometryInputType() const;
+
+ void setGeometryOutputType(GLenum outputType);
+ GLenum geometryOutputType() const;
+
void bindAttributeLocation(const char *name, int location);
void bindAttributeLocation(const QByteArray& name, int location);
void bindAttributeLocation(const QString& name, int location);