A small OpenGL 3+ renderer and game engine
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.
 
 
 

40 lines
852 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);
void entSetWorldPosition(entity& e, glm::vec3 v);
void entTranslate(entity& e, glm::vec3 v);
void entScale(entity& e, glm::vec3 v);