From 34655c22bfd902ed2ae256185c2e3d18ef1a60e1 Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Wed, 29 Aug 2012 23:25:28 +0000 Subject: [PATCH] fixed size update bug in glw texture 2D. --- wrap/glw/texture2d.h | 5 +++++ 1 file changed, 5 insertions(+) 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); }