|
|
|
|
@ -6,12 +6,13 @@
|
|
|
|
|
// - lighting
|
|
|
|
|
// - add light struct
|
|
|
|
|
// - pass all lights to render groups/shaders every frame
|
|
|
|
|
// - maybe use more than one model in a scene
|
|
|
|
|
// - map generation
|
|
|
|
|
// - pathfinding
|
|
|
|
|
// - assimp animation
|
|
|
|
|
// - replace aixlog with custom logging iostream?
|
|
|
|
|
// - fix vector normalization in renderer.cpp when moving in 2 directions
|
|
|
|
|
// - may be fixed?? need to test by examining camera position between frames
|
|
|
|
|
// and compare the distance
|
|
|
|
|
// - add prefix to interface function names for eg) gooey.h, renderer.h
|
|
|
|
|
// - move hex logic to new file to leave only init glue in a main.cpp
|
|
|
|
|
// - move SDL input callbacks somewhere too?
|
|
|
|
|
@ -19,7 +20,6 @@
|
|
|
|
|
// - actually don't need to save the vertex/normal buffers after passing
|
|
|
|
|
// to opengl
|
|
|
|
|
// - replace calls to malloc/free with safe(r) function in util.h
|
|
|
|
|
// - also need to make a macro that works with malloc void * and c++
|
|
|
|
|
// - add cpu perforcmace counters in render loop
|
|
|
|
|
// - check for memory leaks w/ valgrind
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
@ -550,12 +550,15 @@ int main(int argc, char* argv[])
|
|
|
|
|
game_state* g = g_game_state; |
|
|
|
|
g->entities = (Entity*) std::calloc(1000, sizeof(Entity)); |
|
|
|
|
|
|
|
|
|
const char* test_file1 = "../data/animated.block.dae"; |
|
|
|
|
const char* test_file2 = "../data/catepillar.dae"; |
|
|
|
|
meMeshGroup mg1, mg2; |
|
|
|
|
|
|
|
|
|
if (meLoadFromFile(test_file1, mg1)) { |
|
|
|
|
g->entities[g->entity_count].mesh_group = mg1; |
|
|
|
|
// TODO: store these meMeshGroups serperately from entities to re-use them,
|
|
|
|
|
// and to make initializing easier, eg) appling translation has to happen after
|
|
|
|
|
// rgInitEntity() called from renderer createScene()
|
|
|
|
|
if (meLoadFromFile("../data/animated.block.dae", mg1)) { |
|
|
|
|
Entity& e = g->entities[0]; |
|
|
|
|
e.mesh_group = mg1; |
|
|
|
|
e.scale = glm::vec3(100,100,100); |
|
|
|
|
g->entity_count++; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
@ -563,8 +566,11 @@ int main(int argc, char* argv[])
|
|
|
|
|
return 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (meLoadFromFile(test_file2, mg2)) { |
|
|
|
|
g->entities[g->entity_count].mesh_group = mg2; |
|
|
|
|
if (meLoadFromFile("../data/catepillar.dae", mg2)) { |
|
|
|
|
Entity& e = g->entities[1]; |
|
|
|
|
e.mesh_group = mg2; |
|
|
|
|
e.scale = glm::vec3(10,10,10); |
|
|
|
|
e.translation = glm::vec3(640, 500, 0); |
|
|
|
|
g->entity_count++; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
|