Skip to content

Commit

Permalink
uint32_t triangle in mesh buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Nov 22, 2023
1 parent d4d81b9 commit 2ed8add
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions include/vclib/ext/opengl2/drawable_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,14 @@ class DrawableMesh : public GenericDrawableMesh
uint nv = mrb.vertexNumber();
uint nt = mrb.triangleNumber();

const float* coords = mrb.vertexBufferData();
const int* triangles = mrb.triangleBufferData();
const float* vertexNormals = mrb.vertexNormalBufferData();
const float* vertexColors = mrb.vertexColorBufferData();
const float* triangleNormals = mrb.triangleNormalBufferData();
const float* triangleColors = mrb.triangleColorBufferData();
const float* vertTexCoords = mrb.vertexTexCoordsBufferData();
const float* wedgTexCoords = mrb.wedgeTexCoordsBufferData();
const float* coords = mrb.vertexBufferData();
const uint32_t* triangles = mrb.triangleBufferData();
const float* vertexNormals = mrb.vertexNormalBufferData();
const float* vertexColors = mrb.vertexColorBufferData();
const float* triangleNormals = mrb.triangleNormalBufferData();
const float* triangleColors = mrb.triangleColorBufferData();
const float* vertTexCoords = mrb.vertexTexCoordsBufferData();
const float* wedgTexCoords = mrb.wedgeTexCoordsBufferData();

if (mrs.isPointCloudVisible()) {
glEnableClientState(GL_VERTEX_ARRAY);
Expand Down
22 changes: 11 additions & 11 deletions include/vclib/render/mesh_render_buffers.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ class MeshRenderBuffers
uint nv = 0;
uint nt = 0;

std::vector<float> verts;
std::vector<int> tris;
std::vector<float> vNormals;
std::vector<float> vColors;
std::vector<float> tNormals;
std::vector<float> tColors;
std::vector<float> vTexCoords;
std::vector<float> wTexCoords;
std::vector<short> wTexIds;
std::array<float, 4> mColor;
std::vector<float> verts;
std::vector<uint32_t> tris;
std::vector<float> vNormals;
std::vector<float> vColors;
std::vector<float> tNormals;
std::vector<float> tColors;
std::vector<float> vTexCoords;
std::vector<float> wTexCoords;
std::vector<short> wTexIds;
std::array<float, 4> mColor;

vcl::Point3d bbmin, bbmax;
vcl::TriPolyIndexBiMap triPolyMap;
Expand Down Expand Up @@ -88,7 +88,7 @@ class MeshRenderBuffers
return verts.data();
}

const int* triangleBufferData() const
const uint32_t* triangleBufferData() const
{
if (tris.empty())
return nullptr;
Expand Down

0 comments on commit 2ed8add

Please sign in to comment.