[build] Fixes some compiler warnings when building for GLES 2
There were a number of variables shadowing other symbols, and an unused display variable.
This commit is contained in:
parent
c56d5b1468
commit
344dc62638
@ -89,13 +89,13 @@ cogl_gles2_wrapper_create_shader (GLenum type, const char *source)
|
|||||||
|
|
||||||
if (!status)
|
if (!status)
|
||||||
{
|
{
|
||||||
char log[1024];
|
char shader_log[1024];
|
||||||
GLint len;
|
GLint len;
|
||||||
|
|
||||||
glGetShaderInfoLog (shader, sizeof (log) - 1, &len, log);
|
glGetShaderInfoLog (shader, sizeof (shader_log) - 1, &len, shader_log);
|
||||||
log[len] = '\0';
|
shader_log[len] = '\0';
|
||||||
|
|
||||||
g_critical ("%s", log);
|
g_critical ("%s", shader_log);
|
||||||
|
|
||||||
glDeleteShader (shader);
|
glDeleteShader (shader);
|
||||||
|
|
||||||
@ -538,9 +538,9 @@ cogl_gles2_wrapper_get_program (const CoglGles2WrapperSettings *settings)
|
|||||||
CoglShader *shader
|
CoglShader *shader
|
||||||
= _cogl_shader_pointer_from_handle ((CoglHandle) node->data);
|
= _cogl_shader_pointer_from_handle ((CoglHandle) node->data);
|
||||||
|
|
||||||
if (shader->type == CGL_VERTEX_SHADER)
|
if (shader->type == COGL_SHADER_TYPE_VERTEX)
|
||||||
custom_vertex_shader = TRUE;
|
custom_vertex_shader = TRUE;
|
||||||
else if (shader->type == CGL_FRAGMENT_SHADER)
|
else if (shader->type == COGL_SHADER_TYPE_FRAGMENT)
|
||||||
custom_fragment_shader = TRUE;
|
custom_fragment_shader = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -581,13 +581,13 @@ cogl_gles2_wrapper_get_program (const CoglGles2WrapperSettings *settings)
|
|||||||
|
|
||||||
if (!status)
|
if (!status)
|
||||||
{
|
{
|
||||||
char log[1024];
|
char shader_log[1024];
|
||||||
GLint len;
|
GLint len;
|
||||||
|
|
||||||
glGetProgramInfoLog (program->program, sizeof (log) - 1, &len, log);
|
glGetProgramInfoLog (program->program, sizeof (shader_log) - 1, &len, shader_log);
|
||||||
log[len] = '\0';
|
shader_log[len] = '\0';
|
||||||
|
|
||||||
g_critical ("%s", log);
|
g_critical ("%s", shader_log);
|
||||||
|
|
||||||
glDeleteProgram (program->program);
|
glDeleteProgram (program->program);
|
||||||
g_slice_free (CoglGles2WrapperProgram, program);
|
g_slice_free (CoglGles2WrapperProgram, program);
|
||||||
|
@ -361,30 +361,30 @@ _cogl_path_fill_nodes_scanlines (CoglPathNode *path,
|
|||||||
while (iter)
|
while (iter)
|
||||||
{
|
{
|
||||||
GSList *next = iter->next;
|
GSList *next = iter->next;
|
||||||
GLfloat x0, x1;
|
GLfloat x_0, x_1;
|
||||||
GLfloat y0, y1;
|
GLfloat y_0, y_1;
|
||||||
if (!next)
|
if (!next)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
x0 = GPOINTER_TO_INT (iter->data);
|
x_0 = GPOINTER_TO_INT (iter->data);
|
||||||
x1 = GPOINTER_TO_INT (next->data);
|
x_1 = GPOINTER_TO_INT (next->data);
|
||||||
y0 = bounds_y + i;
|
y_0 = bounds_y + i;
|
||||||
y1 = bounds_y + i + 1.0625f;
|
y_1 = bounds_y + i + 1.0625f;
|
||||||
/* render scanlines 1.0625 high to avoid gaps when
|
/* render scanlines 1.0625 high to avoid gaps when
|
||||||
transformed */
|
transformed */
|
||||||
|
|
||||||
coords[span_no * 12 + 0] = x0;
|
coords[span_no * 12 + 0] = x_0;
|
||||||
coords[span_no * 12 + 1] = y0;
|
coords[span_no * 12 + 1] = y_0;
|
||||||
coords[span_no * 12 + 2] = x1;
|
coords[span_no * 12 + 2] = x_1;
|
||||||
coords[span_no * 12 + 3] = y0;
|
coords[span_no * 12 + 3] = y_0;
|
||||||
coords[span_no * 12 + 4] = x1;
|
coords[span_no * 12 + 4] = x_1;
|
||||||
coords[span_no * 12 + 5] = y1;
|
coords[span_no * 12 + 5] = y_1;
|
||||||
coords[span_no * 12 + 6] = x0;
|
coords[span_no * 12 + 6] = x_0;
|
||||||
coords[span_no * 12 + 7] = y0;
|
coords[span_no * 12 + 7] = y_0;
|
||||||
coords[span_no * 12 + 8] = x0;
|
coords[span_no * 12 + 8] = x_0;
|
||||||
coords[span_no * 12 + 9] = y1;
|
coords[span_no * 12 + 9] = y_1;
|
||||||
coords[span_no * 12 + 10] = x1;
|
coords[span_no * 12 + 10] = x_1;
|
||||||
coords[span_no * 12 + 11] = y1;
|
coords[span_no * 12 + 11] = y_1;
|
||||||
span_no ++;
|
span_no ++;
|
||||||
iter = next->next;
|
iter = next->next;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user