34 lines
608 B
C++
34 lines
608 B
C++
#ifndef SHADER_H
|
|
#define SHADER_H
|
|
|
|
#include <QOpenGLShaderProgram>
|
|
|
|
class Shader : public QOpenGLShaderProgram {
|
|
|
|
public:
|
|
|
|
Shader();
|
|
|
|
void setModelMatrix(const QMatrix4x4& m);
|
|
|
|
void setViewMatrix(const QMatrix4x4& m);
|
|
|
|
void setProjectionMatrix(const QMatrix4x4& m);
|
|
|
|
void setColor(const float r, const float g, const float b);
|
|
void setColor(const float r, const float g, const float b, const float a);
|
|
|
|
void setVertices(const float*);
|
|
void unsetVertices();
|
|
|
|
void setNormals(const float*);
|
|
void unsetNormals();
|
|
|
|
int getUniform(const char*);
|
|
int getAttribute(const char*);
|
|
|
|
|
|
};
|
|
|
|
#endif // SHADER_H
|