summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglshaderprogram.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-02-08 12:09:17 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-02-08 12:09:17 (GMT)
commit492f1f4267074525e33fb8571c12d520e92163a6 (patch)
treef121cc4aabf683208dda00b50bc84bca55fffb7a /src/opengl/qglshaderprogram.h
parentdd1a2ad2eb40afd29d418cdf54544d110d39dc25 (diff)
parente98c07e5247a5ad4876c4add595ec1897b73b190 (diff)
downloadQt-492f1f4267074525e33fb8571c12d520e92163a6.zip
Qt-492f1f4267074525e33fb8571c12d520e92163a6.tar.gz
Qt-492f1f4267074525e33fb8571c12d520e92163a6.tar.bz2
Merge branch 'geometry-shaders-to-integrate'
Conflicts: src/opengl/qglshaderprogram.cpp
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 19ce9f2..d612b05 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 hasOpenGLShaders(ShaderType type, const QGLContext *context = 0);
+
private:
friend class QGLShaderProgram;
@@ -100,6 +103,14 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QGLShader::ShaderType)
class QGLShaderProgramPrivate;
+#ifndef GL_EXT_geometry_shader4
+# define GL_LINES_ADJACENCY_EXT 0xA
+# define GL_LINE_STRIP_ADJACENCY_EXT 0xB
+# define GL_TRIANGLES_ADJACENCY_EXT 0xC
+# define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0xD
+#endif
+
+
class Q_OPENGL_EXPORT QGLShaderProgram : public QObject
{
Q_OBJECT
@@ -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);