From 562a1b74105d204341e0e7eba5a7250cd5212fa4 Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 30 May 2021 15:03:40 +0200 Subject: [PATCH] Add debug mode with DEBUG=1 --- source/app.d | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/app.d b/source/app.d index 56e52ea..7173f50 100644 --- a/source/app.d +++ b/source/app.d @@ -45,7 +45,7 @@ void main(string[] args) glfwSetFramebufferSizeCallback(window, &windowResizeCallback); glfwSetScrollCallback(window, &scrollCallback); loadOpenGL(); - + // Initialize Inochi2D inInit(cast(double function())glfwGetTime); @@ -57,6 +57,12 @@ void main(string[] args) inGetCamera().scale = vec2(1); Puppet puppet = inLoadPuppet(args[1]); + + if (environment.get("DEBUG") == "1") { + inDbgDrawMeshOutlines = true; + inDbgDrawMeshVertexPoints = true; + inDbgDrawMeshOrientation = true; + } while(!glfwWindowShouldClose(window)) { glClear(GL_COLOR_BUFFER_BIT); @@ -70,6 +76,7 @@ void main(string[] args) puppet.update(); puppet.draw(); + puppet.drawOutlines(); inEndScene();