Skip to content

Commit

Permalink
Add debug mode with DEBUG=1
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed May 30, 2021
1 parent 0b726e4 commit 562a1b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void main(string[] args)
glfwSetFramebufferSizeCallback(window, &windowResizeCallback);
glfwSetScrollCallback(window, &scrollCallback);
loadOpenGL();

// Initialize Inochi2D
inInit(cast(double function())glfwGetTime);

Expand All @@ -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);
Expand All @@ -70,6 +76,7 @@ void main(string[] args)

puppet.update();
puppet.draw();
puppet.drawOutlines();

inEndScene();

Expand Down

0 comments on commit 562a1b7

Please sign in to comment.