summaryrefslogtreecommitdiff
path: root/src/engine/M_object.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/M_object.h')
-rw-r--r--src/engine/M_object.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/engine/M_object.h b/src/engine/M_object.h
index ca87f0a..96bd0fe 100644
--- a/src/engine/M_object.h
+++ b/src/engine/M_object.h
@@ -9,9 +9,13 @@
#include <assimp/mesh.h>
#include <assimp/postprocess.h>
-//#include "M_game.h"
#include "M_shader.h"
+enum {
+ M_OBJECT_CUBE,
+ M_OBJECT_CUSTOM
+};
+
//Temporary type for storing M_Object rotation information,
//will get replaced in later revisions.
typedef struct {
@@ -26,12 +30,19 @@ typedef struct {
unsigned int VAO, VBO, EBO;
} M_ViewModel;
+typedef struct {
+ unsigned short type;
+ M_ViewModel *model;
+} M_ObjectInfo;
+
//Type meant for handling 3D models in a scene,
//stores additional information like a model's position, size and rotation.
typedef struct {
M_ViewModel *model;
M_ShaderProgram *shader;
+ unsigned short type;
+
vec3 pos, size;
M_Rotation rotation;
@@ -49,7 +60,7 @@ void M_killViewModel(M_ViewModel *model);
M_ViewModel M_loadViewModel(const char* filename);
//Creates a M_Object
-void M_createObject(M_Object *obj, M_ViewModel *model);
+void M_createObject(M_Object *obj, M_ObjectInfo object_info);
//Functions for moving, scaling and rotating M_Object