summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2009-02-25 16:23:09 +0000
committerRobert Bragg <robert@linux.intel.com>2009-02-26 16:42:32 +0000
commitf8166440227d905cebfd17a0a5b8507f3defd47d (patch)
treeed9c0cffdd55fd90a722e5a16aa29fd8e2485a0b /common
parent9878fdf5c67572dfc789ce2e25079b7349843260 (diff)
downloadcogl-f8166440227d905cebfd17a0a5b8507f3defd47d.tar.gz
[cogl-matrix] Documents that CoglMatrix members should be considered read only
In the future if we want to annotate matrices with internal flags, and add caching of the inverse matrix then we need to ensure that all matrix modifications are done by cogl_matrix API so we'd know when to dirty the cache or update the flags. This just adds documentation to that effect, and assuming the most likley case where someone would try and directly write to matrix members would probably be to load a constant matrix other than the identity matrix; I renamed cogl_matrix_init_from_gl_matrix to cogl_matrix_init_from_array to make it seem more general purpose.
Diffstat (limited to 'common')
-rw-r--r--common/cogl-matrix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/cogl-matrix.c b/common/cogl-matrix.c
index 26b6b926..a99473da 100644
--- a/common/cogl-matrix.c
+++ b/common/cogl-matrix.c
@@ -141,13 +141,13 @@ cogl_matrix_transform_point (const CoglMatrix *matrix,
}
void
-cogl_matrix_init_from_gl_matrix (CoglMatrix *matrix, const float *gl_matrix)
+cogl_matrix_init_from_array (CoglMatrix *matrix, const float *array)
{
- memcpy (matrix, gl_matrix, sizeof (float) * 16);
+ memcpy (matrix, array, sizeof (float) * 16);
}
const float *
-cogl_matrix_get_gl_matrix (const CoglMatrix *matrix)
+cogl_matrix_get_array (const CoglMatrix *matrix)
{
return (float *)matrix;
}