You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
904 B
41 lines
904 B
|
|
#pragma once |
|
|
|
#include <glm/glm.hpp> |
|
|
|
#include "mesh.h" |
|
#include "render_object.h" |
|
|
|
|
|
struct render_objects |
|
{ |
|
render_object* objs; |
|
uint count; |
|
}; |
|
|
|
// NOTE: an entity is the basic unit of the high level renderer interface |
|
struct entity |
|
{ |
|
// NOTE: glm::mat4 combines translation, scale, and rotation in a 4x4 |
|
// transform matrix. This is the equivalent of the 'model' matrix in |
|
// the model, view, projection matrix composition |
|
glm::mat4 world_transform; |
|
|
|
// TODO: should be a pointer into a global array of mesh_info(s) or |
|
// mesh_groups stored on the render_state object |
|
meMeshGroup mesh_group; |
|
|
|
render_objects render_objs; |
|
}; |
|
|
|
bool entInit(entity& e, const char* model_path); |
|
|
|
void entFree(entity& e); |
|
|
|
// TODO: just use glm::vec3 here also |
|
void entSetWorldPosition(entity& e, float x, float y, float z); |
|
|
|
void entTranslate(entity& e, glm::vec3 v); |
|
|
|
void entScale(entity& e, glm::vec3 v); |
|
|
|
|