Commit ce81fdb6 by Philipp Adolf

Use GLuint for precomputed tables

parent 1431f036
...@@ -52,9 +52,9 @@ Mesh *Subdivision::subdivide(Mesh *mesh) { ...@@ -52,9 +52,9 @@ Mesh *Subdivision::subdivide(Mesh *mesh) {
input.vertex_buffer = current_mesh->getVertexBuffer(); input.vertex_buffer = current_mesh->getVertexBuffer();
input.index_buffer = current_mesh->getIndexBuffer(); input.index_buffer = current_mesh->getIndexBuffer();
QVector<unsigned int> edgeIndices; QVector<GLuint> edgeIndices;
QVector<unsigned int> vertexIndices; QVector<GLuint> vertexIndices;
QVector<unsigned int> vertexIndicesOffsets; QVector<GLuint> vertexIndicesOffsets;
precomputeTables(input, edgeIndices, vertexIndices, vertexIndicesOffsets); precomputeTables(input, edgeIndices, vertexIndices, vertexIndicesOffsets);
runShader(input, edgeIndices); runShader(input, edgeIndices);
return NULL; return NULL;
......
...@@ -27,9 +27,9 @@ private: ...@@ -27,9 +27,9 @@ private:
QOpenGLShaderProgram *edgeShader; QOpenGLShaderProgram *edgeShader;
QOpenGLShaderProgram *initComputeShaderProgram(QString &source); QOpenGLShaderProgram *initComputeShaderProgram(QString &source);
void precomputeTables(Input input, QVector<unsigned int> &edgeIndices_base, void precomputeTables(Input input, QVector<GLuint> &edgeIndices_base,
QVector<unsigned int> &vertexIndices, QVector<unsigned int> &vertexIndicesOffsets); QVector<GLuint> &vertexIndices, QVector<GLuint> &vertexIndicesOffsets);
void runShader(Input input, QVector<unsigned int> &edgeIndices); void runShader(Input input, QVector<GLuint> &edgeIndices);
}; };
#endif #endif
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