Skip to content

Commit

Permalink
renderless: update UVs
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Jul 3, 2022
1 parent 089cc57 commit a3ae512
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/inochi2d/core/nodes/part/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

/*
Expand Down Expand Up @@ -498,7 +500,7 @@ public:
mmvp = partMaskShader.getUniformLocation("mvp");
mthreshold = partMaskShader.getUniformLocation("threshold");
}

this.updateUVs();
}

Expand Down

0 comments on commit a3ae512

Please sign in to comment.