Commit 2d28fda0 by Philipp Adolf

Rename toTriangles

parent b21bdb93
...@@ -72,7 +72,7 @@ void Subdivision::subdivide(Mesh *mesh, int level) { ...@@ -72,7 +72,7 @@ void Subdivision::subdivide(Mesh *mesh, int level) {
input.vb_handle = entry->VB_handle; input.vb_handle = entry->VB_handle;
input.vertex_buffer = entry->vertices; input.vertex_buffer = entry->vertices;
input.index_irregular_buffer = entry->indices_irregular; input.index_irregular_buffer = entry->indices_irregular;
input.index_regular_buffer = getTriangles(entry->indices_regular); input.index_regular_buffer = patchIBToTriangleIB(entry->indices_regular);
if (input.index_irregular_buffer.isEmpty()) { if (input.index_irregular_buffer.isEmpty()) {
// current_mesh->update(input.vb_handle, input.vertex_buffer, input.index_buffer, entry->indices_regular); // current_mesh->update(input.vb_handle, input.vertex_buffer, input.index_buffer, entry->indices_regular);
...@@ -578,7 +578,7 @@ QVector<unsigned int> Subdivision::getPatchIndexBuffer(QVector<unsigned int> ib_ ...@@ -578,7 +578,7 @@ QVector<unsigned int> Subdivision::getPatchIndexBuffer(QVector<unsigned int> ib_
/** /**
* Turns a patch index buffer into an index buffer of triangles. * Turns a patch index buffer into an index buffer of triangles.
*/ */
QVector<unsigned int> Subdivision::getTriangles(QVector<unsigned int> ib) { QVector<unsigned int> Subdivision::patchIBToTriangleIB(QVector<unsigned int> ib) {
QVector<unsigned int> new_ib; QVector<unsigned int> new_ib;
for (int i = 0; i < ib.length(); i += 12) { for (int i = 0; i < ib.length(); i += 12) {
new_ib.push_back(ib[i+3]); new_ib.push_back(ib[i+3]);
......
...@@ -63,7 +63,7 @@ private: ...@@ -63,7 +63,7 @@ private:
void runVertexShader(GLuint size, GLuint vb_handle, GLuint vertex_indices_handle, GLuint vertex_offsets_handle, GLuint output_handle); void runVertexShader(GLuint size, GLuint vb_handle, GLuint vertex_indices_handle, GLuint vertex_offsets_handle, GLuint output_handle);
void runEdgeShader(GLuint size, GLuint vb_handle, GLuint edge_indices_handle, GLuint output_handle, GLuint offset); void runEdgeShader(GLuint size, GLuint vb_handle, GLuint edge_indices_handle, GLuint output_handle, GLuint offset);
QVector<unsigned int> getTriangles(QVector<unsigned int> ib); QVector<unsigned int> patchIBToTriangleIB(QVector<unsigned int> ib);
QVector<unsigned int> getPatchIndexBuffer(QVector<unsigned int> ib_regular, QVector<unsigned int> ib_irregular, QVector<Vertex> vb); QVector<unsigned int> getPatchIndexBuffer(QVector<unsigned int> ib_regular, QVector<unsigned int> ib_irregular, QVector<Vertex> vb);
......
Markdown is supported
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