Commit 2e3de66d by Philipp Adolf

Merge refactor into master (using imerge)

parents bb3551a1 1221b6c9
......@@ -16,16 +16,28 @@ public:
Mesh *subdivide(Mesh *mesh);
private:
struct Input
{
GLuint vb_handle;
QVector<unsigned int> index_buffer;
QVector<Vertex> vertex_buffer;
};
struct Tables
{
QVector<GLuint> edge_indices;
QVector<GLuint> vertex_indices;
QVector<GLuint> vertex_offsets;
QVector<GLuint> index_buffer;
};
QOpenGLFunctions_4_3_Core *f;
QOpenGLShaderProgram *edgeShader;
QOpenGLShaderProgram *initEdgeComputeShaderProgram();
void precomputeTables(Mesh *mesh, QVector<QVector<unsigned int> > &edgeIndices_base,
QVector<unsigned int> &vertexIndices, QVector<unsigned int> &vertexIndicesOffsets,
QVector<unsigned int> &newIndexBuffer);
void runShader(Mesh *mesh, QVector<QVector<unsigned int> > &edgeIndices);
QVector<unsigned int> fillVector(unsigned int a, unsigned int b, unsigned int c,unsigned int d);
QOpenGLShaderProgram *initComputeShaderProgram(QString &source);
Tables precomputeTables(Input input);
void runShader(Input input, Tables &tables);
void runEdgeShader(GLuint size, GLuint vb_handle, GLuint edge_indices_handle, GLuint output_handle);
};
#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