Commit 2e3de66d by Philipp Adolf

Merge refactor into master (using imerge)

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