]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
tmp fix for missing BBox
authorPeter Schaefer <schaeferpm@gmail.com>
Thu, 23 Apr 2015 18:27:45 +0000 (20:27 +0200)
committerPeter Schaefer <schaeferpm@gmail.com>
Thu, 23 Apr 2015 18:27:45 +0000 (20:27 +0200)
Weave/Graphix/Model/BBox.cpp
Weave/Graphix/Model/IMetaMesh.cpp

index 4f28d328ee891e3218afcd70a53c026908190072..1f4434194dc2c3a674a8c30f560dfec67d598545 100644 (file)
@@ -14,6 +14,7 @@ BBox::BBox()
        //import("skybox.dae", numvertices, numfaces, vertex, uvs, normals, index, 0);
 
        genBuffer(vertexBuffer, numvertices * 3 * sizeof(float), (void*)vertex);
+       genBuffer(indexBuffer, 4 * sizeof(float), (void*)indexL1);
 
 }
 
@@ -24,8 +25,9 @@ BBox::~BBox()
 
 void BBox::drawModel() const
 {
-       glDrawElements(GL_LINE_LOOP, 4, GL_UNSIGNED_INT, indexL1);
-       glDrawElements(GL_LINE_LOOP, 4, GL_UNSIGNED_INT, indexL2);
-       glDrawElements(GL_LINES, 8, GL_UNSIGNED_INT, indexS1);
+       glDrawElements(GL_LINE_LOOP, 4, GL_UNSIGNED_INT, 0);
+       //glDrawElements(GL_LINE_LOOP, 4, GL_UNSIGNED_INT, indexL1);
+       //glDrawElements(GL_LINE_LOOP, 4, GL_UNSIGNED_INT, indexL2);
+       //glDrawElements(GL_LINES, 8, GL_UNSIGNED_INT, indexS1);
        glBindVertexArray(0);
 }
\ No newline at end of file
index 4ec9792d4b763b25297b1d3da00808ccdb21b9d9..f6f7902d7e3b27401866802bde38545550d2fb3c 100644 (file)
@@ -13,7 +13,7 @@ IMetaMesh::IMetaMesh(const string& _modelpath)
 {
        Assimp::Importer importer;
 
-       const aiScene* scene = importer.ReadFile("../models/" + _modelpath, aiProcess_GenUVCoords | aiProcess_Triangulate | aiProcess_JoinIdenticalVertices | aiProcess_SortByPType | aiProcess_PreTransformVertices);
+       const aiScene* scene = importer.ReadFile("../models/" + _modelpath, aiProcess_GenUVCoords | aiProcess_Triangulate | aiProcess_JoinIdenticalVertices | aiProcess_SortByPType | aiProcess_PreTransformVertices); //
        if (!scene)
        {
                Message::error("The file " + _modelpath + " couldn't be read.\n" + importer.GetErrorString());