Fixed debug circle drawing; add collision detection

This commit is contained in:
2022-12-22 01:24:59 +00:00
parent 2bcee44677
commit d81f2f373c
12 changed files with 160 additions and 73 deletions

View File

@@ -62,6 +62,10 @@ struct sprite *tsprite = NULL;
static unsigned int projUBO;
void debug_draw_phys(int draw) {
debugDrawPhysics = draw;
}
void openglInit()
{
if (!mainwin) {
@@ -129,6 +133,10 @@ void openglRender(struct window *window)
//script_call_sym(window->gui_cb);
call_gui();
//// DEBUG
if (debugDrawPhysics)
gameobject_draw_debugs();
///// Sprites
glDepthFunc(GL_LESS);
shader_use(spriteShader);