Browse Source

Minor cleanup and documentation.

pull/142/head
Vladimír Vondruš 10 years ago
parent
commit
2f97617bb6
  1. 3
      src/Magnum/AbstractTexture.cpp
  2. 1
      src/Magnum/Implementation/TextureState.h

3
src/Magnum/AbstractTexture.cpp

@ -235,8 +235,7 @@ AbstractTexture::~AbstractTexture() {
if(!_id || !(_flags & ObjectFlag::DeleteOnDestruction)) return;
/* Remove all bindings */
for(auto& binding: Context::current().state().texture->bindings)
{
for(auto& binding: Context::current().state().texture->bindings) {
/* MSVC 2015 needs the parentheses around */
if(binding.second == _id) binding = {};
}

1
src/Magnum/Implementation/TextureState.h

@ -142,6 +142,7 @@ struct TextureState {
Containers::Array<std::pair<GLenum, GLuint>> bindings;
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/* Texture object ID, level, layered, layer, access */
Containers::Array<std::tuple<GLuint, GLint, GLboolean, GLint, GLenum>> imageBindings;
#endif
};

Loading…
Cancel
Save