-void init() {
- glm::vec3 vertices[12] = {
- glm::vec3(0.0f, 1.0f, 0.0f),
- glm::vec3(1.0f, -1.0f, -1.0f),
- glm::vec3(-1.0f, -1.0f, -1.0f),
-
- glm::vec3(0.0f, 1.0f, 0.0f),
- glm::vec3(-1.0f, -1.0f, 1.0f),
- glm::vec3(1.0f, -1.0f, 1.0f),
-
- glm::vec3(0.0f, 1.0f, 0.0f),
- glm::vec3(-1.0f, -1.0f, -1.0f),
- glm::vec3(-1.0f, -1.0f, 1.0f),
-
- glm::vec3(0.0f, 1.0f, 0.0f),
- glm::vec3(1.0f, -1.0f, 1.0f),
- glm::vec3(1.0f, -1.0f, -1.0f)
- };
+ if (scene->mNumCameras > 0) {
+ aiCamera *cam = scene->mCameras[0];
+ glm::mat4 camTrans;
+ if (findNodeTrans(scene->mRootNode, cam->mName, &camTrans) != 0)
+ abort(); // there must be a node with the same name as camera