From 03166b0a1720288f65af35d33771a650451ea011 Mon Sep 17 00:00:00 2001 From: milang Date: Sat, 7 Sep 2019 20:01:58 +0200 Subject: [PATCH] add display function --- include/fxengine/object.h | 2 ++ src/object.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/include/fxengine/object.h b/include/fxengine/object.h index ab1a0bd..3d1f72e 100644 --- a/include/fxengine/object.h +++ b/include/fxengine/object.h @@ -26,4 +26,6 @@ void fxe_object_set_faces(fxe_object * object, render_triangle * faces, uint32_t void fxe_object_delete(fxe_object * object); +void fxe_object_display(fxe_object * object); + #endif diff --git a/src/object.c b/src/object.c index dfb5ca3..c1433db 100644 --- a/src/object.c +++ b/src/object.c @@ -52,3 +52,13 @@ void fxe_object_delete(fxe_object * object) fxe_object_init(object); } + + +void fxe_object_display(fxe_object * object) +{ + for (int i = 0; i < object->p_size; i++) + render_translate(&object->points[i]); + + for (int i = 0; i < object->f_size; i++) + render_display_triangle(&object->faces[i]); +}