Tessellation on the quad mesh works!
This commit is contained in:
parent
3b97346ea7
commit
8162ca201e
@ -16,8 +16,8 @@ void main() {
|
||||
tc_out[gl_InvocationID].texture_coordinate = tc_in[gl_InvocationID].texture_coordinate;
|
||||
tc_out[gl_InvocationID].position = tc_in[gl_InvocationID].position;
|
||||
|
||||
gl_TessLevelInner[0] = 1;
|
||||
gl_TessLevelOuter[0] = 1;
|
||||
gl_TessLevelOuter[1] = 1;
|
||||
gl_TessLevelOuter[2] = 1;
|
||||
gl_TessLevelInner[0] = 12;
|
||||
gl_TessLevelOuter[0] = 12;
|
||||
gl_TessLevelOuter[1] = 12;
|
||||
gl_TessLevelOuter[2] = 12;
|
||||
}
|
@ -113,6 +113,8 @@ class QuadMesh : public Mesh {
|
||||
void render_patches(Shader &shader) const {
|
||||
shader.setMat4("model", get_matrix());
|
||||
|
||||
glPatchParameteri(GL_PATCH_VERTICES, 3);
|
||||
|
||||
glBindVertexArray(quadVAO);
|
||||
glDrawArrays(GL_PATCHES, 0, 6);
|
||||
glBindVertexArray(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user