|
|
@ -42,7 +42,9 @@ void Shader::Bind(float *M, float *V, float*P) { |
|
|
|
glBindTexture(GL_TEXTURE_2D, iter->second->mTexture); |
|
|
|
glUniform1i(iter->second->mLocation, iIndex++); |
|
|
|
} |
|
|
|
|
|
|
|
for (auto iter = mUniformVec4s.begin(); iter != mUniformVec4s.end(); ++iter) { |
|
|
|
glUniform4fv(iter->second->mLocation, 1, iter->second->v); |
|
|
|
} |
|
|
|
glEnableVertexAttribArray(mPositionLocation); |
|
|
|
glVertexAttribPointer(mPositionLocation, 4, GL_FLOAT, GL_FALSE, sizeof(Vertex), 0); |
|
|
|
|
|
|
|