X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=ld37_one_room;a=blobdiff_plain;f=src%2Ftexture.cc;h=18dd28f5ec1a1d4c05b2f5db9e6011c4a5a74c6c;hp=ff4d1b57c4244825832f31ceb8593bb43dffa12f;hb=cc8a355e7b709f3eb1132cd6b63cf4e482d58332;hpb=6a928cd98ff50ee668050aa4e50ea80e78bbd843 diff --git a/src/texture.cc b/src/texture.cc index ff4d1b5..18dd28f 100644 --- a/src/texture.cc +++ b/src/texture.cc @@ -38,6 +38,7 @@ void bind_texture(Texture *tex, int tunit) } else { glActiveTexture(GL_TEXTURE0 + tunit); glBindTexture(cur_target[tunit], 0); + glDisable(cur_target[tunit]); assert(glGetError() == GL_NO_ERROR); glActiveTexture(GL_TEXTURE0); } @@ -139,6 +140,7 @@ TextureType Texture::get_type() const void Texture::bind(int tex_unit) const { glActiveTexture(GL_TEXTURE0 + tex_unit); + glEnable(target); glBindTexture(target, id); assert(glGetError() == GL_NO_ERROR); glActiveTexture(GL_TEXTURE0);