Put TinyRender functions and classes inside a TinyRender namespace. The TinyRender library defines some classes with very generic names, such as vec, Matrix, Model, which in my case, when compiling the example browser using a different library for graphics, is giving me name clashes.

This commit is contained in:
Marcel Smit
2020-02-14 11:54:25 +01:00
parent b06cdd5fc1
commit 40e44caedd
8 changed files with 29 additions and 5 deletions

View File

@@ -6,6 +6,9 @@
#include <iostream>
#include <sstream>
#include "Bullet3Common/b3Logging.h"
namespace TinyRender
{
Model::Model(const char *filename) : verts_(), faces_(), norms_(), uv_(), diffusemap_(), normalmap_(), specularmap_()
{
std::ifstream in;
@@ -202,3 +205,4 @@ Vec3f Model::normal(int iface, int nthvert)
int idx = faces_[iface][nthvert][2];
return norms_[idx].normalize();
}
}