mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user