Reposition variable declarations to avoid C99.

This commit is contained in:
Haakon Sporsheim 2009-03-31 14:37:07 +02:00 committed by Neil Roberts
parent ab88c0a888
commit 584eca5eee
2 changed files with 6 additions and 3 deletions

View File

@ -1914,9 +1914,10 @@ cogl_set_source (CoglHandle material_handle)
void
cogl_set_source_texture (CoglHandle texture_handle)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
CoglColor white;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
g_return_if_fail (texture_handle != COGL_INVALID_HANDLE);
cogl_material_set_layer (ctx->default_material, 0, texture_handle);

View File

@ -88,9 +88,11 @@ cogl_matrix_rotate (CoglMatrix *matrix,
{
CoglMatrix rotation;
CoglMatrix result;
float c, s;
angle *= G_PI / 180.0f;
float c = cosf (angle);
float s = sinf (angle);
c = cosf (angle);
s = sinf (angle);
rotation.xx = x * x * (1.0f - c) + c;
rotation.yx = y * x * (1.0f - c) + z * s;