#include #include #include "camera.h" #include "dumbLog.h" #include "renderer.h" #include "entity.h" void doFrameCallback(render_state* rs) { } // TODO: remove/refactor this when we get animation working #include "animation_testing.cpp" int main() { render_state* rs = renInit("assimp loading"); if (rs == nullptr) { LOG(Error) << "Error Initialzing renderer\n"; return 1; } // TODO: this needs to be more convenient rs->render_groups = renAllocateGroup(1, *rs->default_shader); rs->render_group_count = 1; entity& spaceship = rs->render_groups->entities[0]; cameraInitPerspective( rs->cam, glm::vec3(200, -150, 150), glm::vec3(0, 0, 0), glm::vec3(0,0,1) ); renAddLight(rs, glm::vec3(200, -150, 150)); // TODO: look into setting up git-annex for large files. git-lfs works fine // for gitlab, but has no real implementation for self-hosting: // https://github.com/git-lfs/git-lfs/issues/1044 // https://git-annex.branchable.com/ // // NOTE: testing assimp animation info logDebugAnimationInfo("../data/spaceship.glb"); if (entInit(spaceship, "../data/spaceship.glb")) { // TODO: this should be handled in entInit entSetWorldPosition(spaceship, glm::vec3(0, 0, 0)); entScale(spaceship, glm::vec3(20, 20, 20)); // TODO: implement setting rotation from entity //spaceship.rotation = glm::vec4(0, 0, 0, 0); renDoRenderLoop(rs, 60, doFrameCallback); } else { LOG(Error) << "Error initializing entity, exiting\n"; } renShutdown(rs); return 0; }