Change normal matrix from 4x4 to 3x3
This commit is contained in:
@@ -15,12 +15,12 @@ class OpenGlGraphics
|
||||
virtual void realize() = 0;
|
||||
virtual void render() = 0;
|
||||
void setModelMatrix(const glm::mat4 &model_matrix);
|
||||
glm::mat4 getModelMatrix();
|
||||
glm::mat4 getNormalMatrix();
|
||||
const glm::mat4 &getModelMatrix();
|
||||
const glm::mat3 &getNormalMatrix();
|
||||
protected:
|
||||
std::shared_ptr<OpenGlShaderProgram> shaderprog;
|
||||
glm::mat4 model_matrix;
|
||||
glm::mat4 normal_matrix;
|
||||
glm::mat3 normal_matrix;
|
||||
};
|
||||
|
||||
#endif // OPENGLGRAPHICS_H
|
||||
|
@@ -21,6 +21,7 @@ class OpenGlShaderProgram
|
||||
void setUniformVec2(const std::string &uniform, float *vector);
|
||||
void setUniformVec3(const std::string &uniform, const glm::vec3 &vector);
|
||||
void setUniformMat4(const std::string &uniform, const glm::mat4 &matrix);
|
||||
void setUniformMat3(const std::string &uniform, const glm::mat3 &matrix);
|
||||
void setUniformVec4(const std::string &uniform, const glm::vec4 &vector);
|
||||
void setUniformBool(const std::string &uniform, bool value);
|
||||
private:
|
||||
|
Reference in New Issue
Block a user