vbo: Implement new gs prim types in vbo_count_tessellated_primitives.

Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Paul Berry 2013-08-27 20:51:31 -07:00
parent 2937d704dc
commit 2924b5f73b
1 changed files with 12 additions and 0 deletions

View File

@ -149,6 +149,18 @@ vbo_count_tessellated_primitives(GLenum mode, GLuint count,
case GL_QUADS:
num_primitives = (count / 4) * 2;
break;
case GL_LINES_ADJACENCY:
num_primitives = count / 4;
break;
case GL_LINE_STRIP_ADJACENCY:
num_primitives = count >= 4 ? count - 3 : 0;
break;
case GL_TRIANGLES_ADJACENCY:
num_primitives = count / 6;
break;
case GL_TRIANGLE_STRIP_ADJACENCY:
num_primitives = count >= 6 ? (count - 4) / 2 : 0;
break;
default:
assert(!"Unexpected primitive type in count_tessellated_primitives");
num_primitives = 0;