diff --git a/wrap/glw/texture2d.h b/wrap/glw/texture2d.h index e8af978a..0f18d06d 100644 --- a/wrap/glw/texture2d.h +++ b/wrap/glw/texture2d.h @@ -75,6 +75,11 @@ class Texture2D : public Texture { (void)unit; GLW_ASSERT(this->isValid()); + if (level == 0) + { + this->m_width = width; + this->m_height = height; + } glTexImage2D(target, level, this->m_format, width, height, 0, dataFormat, dataType, data); }