summaryrefslogtreecommitdiff
path: root/src/opengl/qglshaderprogram.h
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-06-04 10:13:54 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-06-04 10:13:54 +1000
commit7010a53cbd6bc6d9cc6d63e2170a7300ce2750d8 (patch)
tree323233749dd13a97bb01272d32e3cee1f4f57d44 /src/opengl/qglshaderprogram.h
parent55148bf3c47546a93222c3e48a3e1bad062b5640 (diff)
downloadqt4-tools-7010a53cbd6bc6d9cc6d63e2170a7300ce2750d8.tar.gz
Improvements to shader API in response to API review
Task-number: QT-80 Reviewed-by: Ian Walters
Diffstat (limited to 'src/opengl/qglshaderprogram.h')
-rw-r--r--src/opengl/qglshaderprogram.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index b69d28e341..ab30c32eae 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -79,17 +79,15 @@ public:
QGLShader(const QString& fileName, QGLShader::ShaderType type, const QGLContext *context, QObject *parent = 0);
virtual ~QGLShader();
- bool isValid() const;
-
QGLShader::ShaderType shaderType() const;
- bool setSourceCode(const char *source);
- bool setSourceCode(const QByteArray& source);
- bool setSourceCode(const QString& source);
- bool setSourceCodeFile(const QString& fileName);
+ bool compile(const char *source);
+ bool compile(const QByteArray& source);
+ bool compile(const QString& source);
+ bool compileFile(const QString& fileName);
- bool setBinaryCode(GLenum format, const void *binary, int length);
- bool setBinaryCode(QGLShader& otherShader, GLenum format, const void *binary, int length);
+ bool setShaderBinary(GLenum format, const void *binary, int length);
+ bool setShaderBinary(QGLShader& otherShader, GLenum format, const void *binary, int length);
static QList<GLenum> shaderBinaryFormats();
@@ -118,8 +116,6 @@ public:
explicit QGLShaderProgram(const QGLContext *context, QObject *parent = 0);
virtual ~QGLShaderProgram();
- bool isValid() const;
-
bool addShader(QGLShader *shader);
void removeShader(QGLShader *shader);
QList<QGLShader *> shaders() const;