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:
parent
1a1de0e278
commit
070a91f311
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
@ -638,11 +638,11 @@ cogl_rectangle (float x_1,
|
||||
|
||||
void
|
||||
draw_polygon_sub_texture_cb (CoglHandle tex_handle,
|
||||
GLuint gl_handle,
|
||||
GLenum gl_target,
|
||||
float *subtexture_coords,
|
||||
float *virtual_coords,
|
||||
void *user_data)
|
||||
GLuint gl_handle,
|
||||
GLenum gl_target,
|
||||
const float *subtexture_coords,
|
||||
const float *virtual_coords,
|
||||
void *user_data)
|
||||
{
|
||||
TextureSlicedPolygonState *state = user_data;
|
||||
GLfloat *v;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user