cogl: Make the callback for foreach_sub_texture_in_region use const

The CoglTextureSliceCallback function pointer now takes const pointers
for the texture coordinates. This makes it clearer that the callback
should not modify the array and therefore the backend can use the same
array for both sets of coords.
This commit is contained in:
Neil Roberts 2009-12-02 17:17:24 +00:00
parent 6bc3319c86
commit 7c5aea9b68
4 changed files with 11 additions and 11 deletions

View File

@ -51,7 +51,7 @@ _cogl_journal_log_quad (float x_1,
int n_layers,
guint32 fallback_layers,
GLuint layer0_override_texture,
float *tex_coords,
const float *tex_coords,
unsigned int tex_coords_len);
#endif /* __COGL_JOURNAL_PRIVATE_H */

View File

@ -631,7 +631,7 @@ _cogl_journal_log_quad (float x_1,
int n_layers,
guint32 fallback_layers,
GLuint layer0_override_texture,
float *tex_coords,
const float *tex_coords,
unsigned int tex_coords_len)
{
size_t stride;

View File

@ -71,8 +71,8 @@ static void
log_quad_sub_textures_cb (CoglHandle texture_handle,
GLuint gl_handle,
GLenum gl_target,
float *subtexture_coords,
float *virtual_coords,
const float *subtexture_coords,
const float *virtual_coords,
void *user_data)
{
TextureSlicedQuadState *state = user_data;
@ -640,8 +640,8 @@ void
draw_polygon_sub_texture_cb (CoglHandle tex_handle,
GLuint gl_handle,
GLenum gl_target,
float *subtexture_coords,
float *virtual_coords,
const float *subtexture_coords,
const float *virtual_coords,
void *user_data)
{
TextureSlicedPolygonState *state = user_data;

View File

@ -37,8 +37,8 @@ typedef struct _CoglTextureUploadData CoglTextureUploadData;
typedef void (*CoglTextureSliceCallback) (CoglHandle handle,
GLuint gl_handle,
GLenum gl_target,
float *slice_coords,
float *virtual_coords,
const float *slice_coords,
const float *virtual_coords,
void *user_data);
typedef void (* CoglTextureManualRepeatCallback) (const float *coords,