changed shadereffect texture image unit counter and map to be non-static, get max texture units from max combined TIUs instead of max fragment shader TIUs, added the current MVP matrix as an argument to the vertex shader transform function, reduced code duplication in ShaderEffect::sendImage and sendCanvas

This commit is contained in:
Alexander Szpakowski
2012-12-21 05:03:50 -04:00
parent 0611234067
commit 5252ed28cd
4 changed files with 61 additions and 54 deletions
+6 -4
View File
@@ -72,10 +72,12 @@ private:
std::map<std::string, GLint> _uniforms;
// texture unit pool for setting images
static std::map<std::string, GLint> _texture_unit_pool;
static GLint _current_texture_unit;
static GLint _max_texture_units;
static GLint getTextureUnit(const std::string &name);
std::map<std::string, GLint> _texture_unit_pool;
GLint _current_texture_unit;
GLint _max_texture_units;
GLint getTextureUnit(const std::string &name);
void sendTexture(const std::string &name, GLuint texture);
};
} // opengl