mpri-graphics-project/main_glut.cpp

25 lines
616 B
C++
Raw Permalink Normal View History

/** An entry-point file using render/GlutRender as a renderer
* As of now, mostly for testing purposes.
**/
#include "render/GlutRender.hpp"
#include "util/ObjParser.hpp"
#include "Mesh.hpp"
int main(int argc, char** argv) {
GlutRender& render = GlutRender::get_instance();
render.init(&argc, argv, 640, 480, "Bouncing stuff");
2018-02-06 21:29:32 +01:00
Mesh cube = ObjParser("mesh/cube.obj").parse();
cube.translate(Point(2.5, -1, 0.));
render.add_mesh(&cube);
Mesh tet = ObjParser("mesh/tet.obj").parse();
tet.translate(Point(-2.5, 0.5, 0.));
render.add_mesh(&tet);
render.run();
return 0;
}