From 4f1851abc1dab2e7a09e3fc8855094b393475662 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 13 Feb 2016 12:20:40 -0800 Subject: [PATCH] thin3d: Allow setting size in imagedata. GL should match D3D. Maybe we don't want this, but then we need to change the API. --- ext/native/thin3d/thin3d_gl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/native/thin3d/thin3d_gl.cpp b/ext/native/thin3d/thin3d_gl.cpp index e48b896220..c91c2cfd01 100644 --- a/ext/native/thin3d/thin3d_gl.cpp +++ b/ext/native/thin3d/thin3d_gl.cpp @@ -531,6 +531,11 @@ void Thin3DGLTexture::SetImageData(int x, int y, int z, int width, int height, i default: return; } + if (level == 0) { + width_ = width; + height_ = height; + depth_ = depth; + } Bind(); switch (target_) {