33 lines
698 B
C++
33 lines
698 B
C++
#include <iostream>
|
|
|
|
#include "kekengine.h"
|
|
#include <GL/glew.h>
|
|
#include <GLFW/glfw3.h>
|
|
|
|
using namespace kek;
|
|
|
|
int main(int argc, char **argv) {
|
|
Engine::init();
|
|
|
|
MemoryBuffer *buf = Resource::loadResource("object/sphere/Sphere.obj");
|
|
Mesh *mesh = ObjParser::parseMesh(buf, "object/sphere/");
|
|
delete buf;
|
|
|
|
GameObject *test = new GameObject();
|
|
test->addMesh(mesh);
|
|
|
|
Scene *scene = new Scene();
|
|
scene->addObject(test);
|
|
|
|
for(int i = 0; i < 1; i++) {
|
|
GameObject *test2 = new GameObject();
|
|
test2->addMesh(ObjParser::loadMesh("object/cube_colored/Cube.obj"));
|
|
test2->moveTo(glm::vec3(0.0f, 5.0f, 3 * i));
|
|
scene->addObject(test2);
|
|
}
|
|
|
|
Engine::setActiveScene(scene);
|
|
|
|
Engine::start();
|
|
}
|