made ShaderEffects individully handle texture units for sent images/canvases, added GL helper function for quickly binding a texture to a specific texture unit, hopefully made ShaderEffects load and unload volatile better

This commit is contained in:
Alexander Szpakowski
2012-12-22 00:29:11 -04:00
parent 16f925affa
commit 79fa42d207
5 changed files with 114 additions and 26 deletions
+8
View File
@@ -47,6 +47,14 @@ void setActiveTextureUnit(GLenum textureunit);
**/
void bindTexture(GLuint texture);
/**
* Helper for binding a texture to a specific texture unit
* @param texture The texture to bind
* @param textureunit The texture unit to switch to
* @param resoreprev Restore previous texture unit when done
**/
void bindTextureToUnit(GLuint texture, GLenum textureunit, bool restoreprev);
/**
* Helper for deleting an OpenGL texture.
* Cleans up if the texture is currently bound.