[cogl-material] Make the user_tex_coords parameter of _rectangle const
The array is only used for input so it should be const.
This commit is contained in:
parent
ba2257973e
commit
cd71b91440
@ -409,12 +409,12 @@ void cogl_texture_polygon (CoglHandle handle,
|
|||||||
* layers in the current source material then default texture coordinates
|
* layers in the current source material then default texture coordinates
|
||||||
* [0.0, 0.0, 1.0, 1.0] are generated.
|
* [0.0, 0.0, 1.0, 1.0] are generated.
|
||||||
*/
|
*/
|
||||||
void cogl_material_rectangle (CoglFixed x1,
|
void cogl_material_rectangle (CoglFixed x1,
|
||||||
CoglFixed y1,
|
CoglFixed y1,
|
||||||
CoglFixed x2,
|
CoglFixed x2,
|
||||||
CoglFixed y2,
|
CoglFixed y2,
|
||||||
gint tex_coords_len,
|
gint tex_coords_len,
|
||||||
CoglFixed *tex_coords);
|
const CoglFixed *tex_coords);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -2407,12 +2407,12 @@ cogl_texture_polygon (CoglHandle handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_material_rectangle (CoglFixed x1,
|
cogl_material_rectangle (CoglFixed x1,
|
||||||
CoglFixed y1,
|
CoglFixed y1,
|
||||||
CoglFixed x2,
|
CoglFixed x2,
|
||||||
CoglFixed y2,
|
CoglFixed y2,
|
||||||
gint user_tex_coords_len,
|
gint user_tex_coords_len,
|
||||||
CoglFixed *user_tex_coords)
|
const CoglFixed *user_tex_coords)
|
||||||
{
|
{
|
||||||
CoglHandle material;
|
CoglHandle material;
|
||||||
const GList *layers;
|
const GList *layers;
|
||||||
@ -2487,7 +2487,7 @@ cogl_material_rectangle (CoglFixed x1,
|
|||||||
{
|
{
|
||||||
CoglHandle layer = valid_layers[i];
|
CoglHandle layer = valid_layers[i];
|
||||||
CoglHandle texture = cogl_material_layer_get_texture (layer);
|
CoglHandle texture = cogl_material_layer_get_texture (layer);
|
||||||
CoglFixed *in_tex_coords;
|
const CoglFixed *in_tex_coords;
|
||||||
GLfloat *out_tex_coords = &tex_coords_buff[i * 8];
|
GLfloat *out_tex_coords = &tex_coords_buff[i * 8];
|
||||||
GLuint gl_tex_handle;
|
GLuint gl_tex_handle;
|
||||||
|
|
||||||
|
@ -2498,11 +2498,11 @@ cogl_texture_polygon (CoglHandle handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_material_rectangle (CoglFixed x1,
|
cogl_material_rectangle (CoglFixed x1,
|
||||||
CoglFixed y1,
|
CoglFixed y1,
|
||||||
CoglFixed x2,
|
CoglFixed x2,
|
||||||
CoglFixed y2,
|
CoglFixed y2,
|
||||||
CoglFixed *user_tex_coords)
|
const CoglFixed *user_tex_coords)
|
||||||
{
|
{
|
||||||
CoglHandle material;
|
CoglHandle material;
|
||||||
const GList *layers;
|
const GList *layers;
|
||||||
@ -2568,7 +2568,7 @@ cogl_material_rectangle (CoglFixed x1,
|
|||||||
CoglHandle layer = valid_layers[i];
|
CoglHandle layer = valid_layers[i];
|
||||||
CoglHandle texture_handle = cogl_material_layer_get_texture (layer);
|
CoglHandle texture_handle = cogl_material_layer_get_texture (layer);
|
||||||
CoglTexture *texture = _cogl_texture_pointer_from_handle (texture_handle);
|
CoglTexture *texture = _cogl_texture_pointer_from_handle (texture_handle);
|
||||||
CoglFixed *in_tex_coords = &user_tex_coords[i * 4];
|
const CoglFixed *in_tex_coords = &user_tex_coords[i * 4];
|
||||||
GLfloat *out_tex_coords = &tex_coords_buff[i * 8];
|
GLfloat *out_tex_coords = &tex_coords_buff[i * 8];
|
||||||
GLuint gl_tex_handle;
|
GLuint gl_tex_handle;
|
||||||
GLenum gl_target;
|
GLenum gl_target;
|
||||||
|
Loading…
Reference in New Issue
Block a user