reduced unnecessary usage of glUseProgram, shadereffect is now properly detached in unloadVolatile and reattached if necessary in loadVolatile, made current and max texture units static to prevent different shaders from overwriting the value of different texture units

This commit is contained in:
Alexander Szpakowski
2012-12-21 17:43:47 -04:00
parent 5252ed28cd
commit 5626b74b79
2 changed files with 41 additions and 18 deletions
+2 -2
View File
@@ -72,9 +72,9 @@ private:
std::map<std::string, GLint> _uniforms;
// texture unit pool for setting images
static GLint _current_texture_unit;
static GLint _max_texture_units;
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);