Browse Source

add display function

master
milang 9 months ago
parent
commit
03166b0a17
No known key found for this signature in database GPG Key ID: D287C9D6C33D9035
2 changed files with 12 additions and 0 deletions
  1. +2
    -0
      include/fxengine/object.h
  2. +10
    -0
      src/object.c

+ 2
- 0
include/fxengine/object.h View File

@@ -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

+ 10
- 0
src/object.c View File

@@ -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]);
}

Loading…
Cancel
Save