matrix: Adds experimental cogl_matrix_{transform,project}_points

This add two new function that allows us to transform or project an
array of points instead of only transforming one point at a time. Recent
benchmarking has shown cogl_matrix_transform_point to be a bottleneck
sometimes, so this should allow us to reduce the overhead when
transforming lots of vertices at the same time, and also reduce the cost
of 3 component, non-projective transforms.

For now they are marked as experimental (you have to define
COGL_ENABLE_EXPERIMENTAL_API) because there is some concern that it
introduces some inconsistent naming. cogl_matrix_transform_point would
have to be renamed cogl_matrix_project_point to be consistent, but that
would be an API break.
This commit is contained in:
Robert Bragg
2010-11-12 13:35:24 +00:00
parent 56f36cf9c2
commit e9e824fd86
3 changed files with 470 additions and 1 deletions

View File

@ -436,7 +436,6 @@ cogl_matrix_init_identity
cogl_matrix_frustum
cogl_matrix_ortho
cogl_matrix_perspective
cogl_matrix_transform_point
cogl_matrix_multiply
cogl_matrix_rotate
cogl_matrix_translate
@ -444,6 +443,7 @@ cogl_matrix_scale
cogl_matrix_init_from_array
cogl_matrix_get_array
cogl_matrix_get_inverse
cogl_matrix_transform_point
</SECTION>
<SECTION>