Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see https://gitlab.lrz.de/profile/account). Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at https://doku.lrz.de/display/PUBLIC/GitLab . Thank you!

Commit b2472508 authored by Jakob Weiss's avatar Jakob Weiss

Fixed TextureManager assertions

parent 3f555763
......@@ -139,8 +139,8 @@ GLuint cgt::TextureManager::generateId(GLenum type, const cgt::svec3 & dimension
cache_key_t cacheKey{ type, dimensions.x, dimensions.y, dimensions.z, internalFormat };
cgtAssert(cgt::hmul(dimensions) > 0, "At least one dimension is zero!");
cgtAssert(type == GL_TEXTURE_1D && dimensions.y == 1 && dimensions.z == 1, "1D texture but higher dimensions are not 1!");
cgtAssert(type == GL_TEXTURE_2D && dimensions.z == 1, "2D texture but z is not 1!");
cgtAssert(type != GL_TEXTURE_1D || (dimensions.y == 1 && dimensions.z == 1), "1D texture but higher dimensions are not 1!");
cgtAssert(type != GL_TEXTURE_2D || dimensions.z == 1, "2D texture but z is not 1!");
#ifdef ENABLE_TEXTURE_POOL
std::lock_guard<std::mutex> scope_lock(accessMutex_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment