Commit 8e400fb3 authored by Christopher Tenter's avatar Christopher Tenter
Browse files

cppcheck warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16862 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1d6a7fbb
...@@ -54,6 +54,8 @@ ...@@ -54,6 +54,8 @@
#include <cstring> #include <cstring>
#include <fstream> #include <fstream>
#include <ACG/GL/MeshCompiler.hh>
#ifdef USE_OPENMP #ifdef USE_OPENMP
#include <omp.h> #include <omp.h>
#endif #endif
...@@ -372,6 +374,63 @@ DrawMeshT<Mesh>::rebuild() ...@@ -372,6 +374,63 @@ DrawMeshT<Mesh>::rebuild()
rebuild_ = REBUILD_NONE; rebuild_ = REBUILD_NONE;
// picking buffers update // picking buffers update
///////////////////////////////////////////////////////////////////////////////////////////////////
/// test MeshCompiler
MeshCompiler test(*getVertexDeclaration());
test.setVertices(getNumVerts(), vertices_, sizeof(Vertex));
test.setNormals(getNumVerts(), (const char*)vertices_ + 5*4, sizeof(Vertex));
test.setTexCoords(getNumVerts(), (const char*)vertices_ + 3*4, sizeof(Vertex));
test.setNumFaces(getNumTris(), getNumTris() * 3);
for (int i = 0; i < getNumTris(); ++i)
{
test.setFaceVerts(i, indices_[i*3], indices_[i*3+1], indices_[i*3+2]);
test.setFaceNormals(i, indices_[i*3], indices_[i*3+1], indices_[i*3+2]);
test.setFaceTexCoords(i, indices_[i*3], indices_[i*3+1], indices_[i*3+2]);
}
test.build();
test.dbgdumpObj("../../meshcompiler_out.obj");
////////////////////////////////////////////////////////////////////////////////////////////
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment