Compare commits

..
2 Commits
2 changed files with 7 additions and 1 deletions

No files matched your search

+6
View File
@@ -462,6 +462,12 @@ bool WFObj::buildVBO()
it != m_faces.end(); it != m_faces.end();
it++) it++)
{ {
if (m_materials.find(it->first) == m_materials.end())
{
cerr << "Material '" << it->first << "' referenced in '"
<< m_path << "' is not defined." << endl;
return false;
}
for (vector<Face>::iterator fit = it->second.begin(); for (vector<Face>::iterator fit = it->second.begin();
fit != it->second.end(); fit != it->second.end();
fit++) fit++)
+1 -1
View File
@@ -19,7 +19,7 @@ public:
class Buffer class Buffer
{ {
public: public:
Buffer() : m_alloc(false) {} Buffer() : m_alloc(false) {data = NULL; length = 0;}
~Buffer() { if (m_alloc) delete data; } ~Buffer() { if (m_alloc) delete data; }
uint8_t *data; uint8_t *data;
size_t length; size_t length;