This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
IndoorMap/mapview/3D/misc/Shader.h
2018-10-25 12:23:40 +02:00

49 lines
1.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* © Copyright 2014 Urheberrechtshinweis
* Alle Rechte vorbehalten / All Rights Reserved
*
* Programmcode ist urheberrechtlich geschuetzt.
* Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner.
* Keine Verwendung ohne explizite Genehmigung.
* (vgl. § 106 ff UrhG / § 97 UrhG)
*/
#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 setUseNormals(bool use);
void setNormals(const float*);
void unsetNormals();
void setVertexColor(const float*);
void unsetVertexColor();
void setUseVertexColor(bool use);
int getUniform(const char*);
int getAttribute(const char*);
};
#endif // SHADER_H