From a3ae512770ec9c416d57b8e1f7dab41d5b49901c Mon Sep 17 00:00:00 2001 From: LunaTheFoxgirl Date: Sun, 3 Jul 2022 13:47:46 +0200 Subject: [PATCH] renderless: update UVs --- source/inochi2d/core/nodes/part/package.d | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/inochi2d/core/nodes/part/package.d b/source/inochi2d/core/nodes/part/package.d index 821e4bc..573e815 100644 --- a/source/inochi2d/core/nodes/part/package.d +++ b/source/inochi2d/core/nodes/part/package.d @@ -126,8 +126,10 @@ private: GLuint uvbo; void updateUVs() { - glBindBuffer(GL_ARRAY_BUFFER, uvbo); - glBufferData(GL_ARRAY_BUFFER, data.uvs.length*vec2.sizeof, data.uvs.ptr, GL_STATIC_DRAW); + version(InDoesRender) { + glBindBuffer(GL_ARRAY_BUFFER, uvbo); + glBufferData(GL_ARRAY_BUFFER, data.uvs.length*vec2.sizeof, data.uvs.ptr, GL_STATIC_DRAW); + } } /* @@ -498,7 +500,7 @@ public: mmvp = partMaskShader.getUniformLocation("mvp"); mthreshold = partMaskShader.getUniformLocation("threshold"); } - + this.updateUVs(); }