//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);
}
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
{
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());