[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:
Neil Roberts 2009-01-06 16:09:55 +00:00
parent b3b7312f33
commit 606d34f2aa
3 changed files with 19 additions and 19 deletions

View File

@ -409,12 +409,12 @@ void cogl_texture_polygon (CoglHandle handle,
* layers in the current source material then default texture coordinates
* [0.0, 0.0, 1.0, 1.0] are generated.
*/
void cogl_material_rectangle (CoglFixed x1,
CoglFixed y1,
CoglFixed x2,
CoglFixed y2,
gint tex_coords_len,
CoglFixed *tex_coords);
void cogl_material_rectangle (CoglFixed x1,
CoglFixed y1,
CoglFixed x2,
CoglFixed y2,
gint tex_coords_len,
const CoglFixed *tex_coords);
G_END_DECLS

View File

@ -2407,12 +2407,12 @@ cogl_texture_polygon (CoglHandle handle,
}
void
cogl_material_rectangle (CoglFixed x1,
CoglFixed y1,
CoglFixed x2,
CoglFixed y2,
gint user_tex_coords_len,
CoglFixed *user_tex_coords)
cogl_material_rectangle (CoglFixed x1,
CoglFixed y1,
CoglFixed x2,
CoglFixed y2,
gint user_tex_coords_len,
const CoglFixed *user_tex_coords)
{
CoglHandle material;
const GList *layers;
@ -2487,7 +2487,7 @@ cogl_material_rectangle (CoglFixed x1,
{
CoglHandle layer = valid_layers[i];
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];
GLuint gl_tex_handle;

View File

@ -2498,11 +2498,11 @@ cogl_texture_polygon (CoglHandle handle,
}
void
cogl_material_rectangle (CoglFixed x1,
CoglFixed y1,
CoglFixed x2,
CoglFixed y2,
CoglFixed *user_tex_coords)
cogl_material_rectangle (CoglFixed x1,
CoglFixed y1,
CoglFixed x2,
CoglFixed y2,
const CoglFixed *user_tex_coords)
{
CoglHandle material;
const GList *layers;
@ -2568,7 +2568,7 @@ cogl_material_rectangle (CoglFixed x1,
CoglHandle layer = valid_layers[i];
CoglHandle texture_handle = cogl_material_layer_get_texture (layer);
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];
GLuint gl_tex_handle;
GLenum gl_target;