fixed openGL issues
This commit is contained in:
@@ -51,6 +51,7 @@ Shader::Shader() {
|
||||
|
||||
|
||||
void Shader::setModelMatrix(const QMatrix4x4& m) {
|
||||
//vao.bind();;
|
||||
setUniformValue(getUniform("M"), m);
|
||||
}
|
||||
|
||||
@@ -78,6 +79,7 @@ int Shader::getUniform(const char* name) {
|
||||
return loc;
|
||||
}
|
||||
int Shader::getAttribute(const char* name) {
|
||||
vao.bind();
|
||||
int loc = attributeLocation(name);
|
||||
if (loc == -1) {throw std::runtime_error("error");}
|
||||
return loc;
|
||||
|
||||
Reference in New Issue
Block a user