#pragma once #include #include "mesh.h" #include "render_object.h" enum mesh_group_type { DEFAULT_MESHES = 0, SIMPLE_MESH = 1 }; struct entity { glm::mat4 world_transform; mesh_group_type mesh_type; simple_mesh mesh; simple_render_object simple_ro; GLenum draw_mode; // TODO: should be a pointer into a global array of mesh_info(s) or // mesh_groups stored on the render_state object mesh_group meshes; render_object* render_objs; uint ro_count; }; bool entInitModel(entity& e, const char* model_path); bool entInitSimpleMesh(entity& e, simple_mesh& mesh, GLenum draw_mode); void entFree(entity& e); void entSetWorldPosition(entity& e, glm::vec3 v); void entTranslate(entity& e, glm::vec3 v); void entScale(entity& e, glm::vec3 v);