Vocabulary
game.debug.tests

Inputs
worldan object


Outputs
None

Definition


:: draw-debug-tests ( world -- )
world [ wasd-p-matrix ] [ wasd-mv-matrix ] bi mdot
:> mvp-matrix { 0 0 0 } clear-screen [
{ 0 0 0 } { 1 0 0 } T{ rgba
{ red 1.0 }
{ green 0.0 }
{ blue 0.0 }
{ alpha 1.0 }
} debug-line
{ 0 0 0 } { 0 1 0 } T{ rgba
{ red 0.0 }
{ green 1.0 }
{ blue 0.0 }
{ alpha 1.0 }
} debug-line
{ 0 0 0 } { 0 0 1 } T{ rgba
{ red 0.0 }
{ green 0.0 }
{ blue 1.0 }
{ alpha 1.0 }
} debug-line
{ -1.2 0 0 } { 0 1 0 } 0 deg>rad <rotation-matrix3>
debug-axes
{ 3 5 -2 } { 3 2 1 } T{ rgba
{ red 1.0 }
{ green 1.0 }
{ blue 1.0 }
{ alpha 1.0 }
} debug-box { 0 9 0 } 8 2 T{ rgba
{ red 0.0 }
{ green 0.0 }
{ blue 1.0 }
{ alpha 1.0 }
} debug-cylinder
] float-array{ } make mvp-matrix draw-debug-lines [
{ 0 4.0 0 } T{ rgba
{ red 1.0 }
{ green 0.0 }
{ blue 0.0 }
{ alpha 1.0 }
} debug-point
{ 0 4.1 0 } T{ rgba
{ red 0.0 }
{ green 1.0 }
{ blue 0.0 }
{ alpha 1.0 }
} debug-point
{ 0 4.2 0 } T{ rgba
{ red 0.0 }
{ green 0.0 }
{ blue 1.0 }
{ alpha 1.0 }
} debug-point
] float-array{ } make mvp-matrix draw-debug-points
"Frame: " world frame#>> number>string append T{ rgba
{ red 0.6274509803921569 }
{ green 0.1254901960784314 }
{ blue 0.9411764705882353 }
{ alpha 1.0 }
} { 5 5 } world dim>> draw-text world [ 1 + ] change-frame#
drop ;