mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
cogl-boxed-value: Wrap the GL calls in the GE() macro
This wraps all of the calls to glUniform* in the GE() macro so that it will detect GL errors in the right place. Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
256f5791fd
commit
7068849ae6
@ -229,10 +229,18 @@ _cogl_boxed_value_set_uniform (CoglContext *ctx,
|
|||||||
|
|
||||||
switch (value->size)
|
switch (value->size)
|
||||||
{
|
{
|
||||||
case 1: ctx->glUniform1iv (location, value->count, ptr); break;
|
case 1:
|
||||||
case 2: ctx->glUniform2iv (location, value->count, ptr); break;
|
GE( ctx, glUniform1iv (location, value->count, ptr) );
|
||||||
case 3: ctx->glUniform3iv (location, value->count, ptr); break;
|
break;
|
||||||
case 4: ctx->glUniform4iv (location, value->count, ptr); break;
|
case 2:
|
||||||
|
GE( ctx, glUniform2iv (location, value->count, ptr) );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
GE( ctx, glUniform3iv (location, value->count, ptr) );
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
GE( ctx, glUniform4iv (location, value->count, ptr) );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -248,10 +256,18 @@ _cogl_boxed_value_set_uniform (CoglContext *ctx,
|
|||||||
|
|
||||||
switch (value->size)
|
switch (value->size)
|
||||||
{
|
{
|
||||||
case 1: ctx->glUniform1fv (location, value->count, ptr); break;
|
case 1:
|
||||||
case 2: ctx->glUniform2fv (location, value->count, ptr); break;
|
GE( ctx, glUniform1fv (location, value->count, ptr) );
|
||||||
case 3: ctx->glUniform3fv (location, value->count, ptr); break;
|
break;
|
||||||
case 4: ctx->glUniform4fv (location, value->count, ptr); break;
|
case 2:
|
||||||
|
GE( ctx, glUniform2fv (location, value->count, ptr) );
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
GE( ctx, glUniform3fv (location, value->count, ptr) );
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
GE( ctx, glUniform4fv (location, value->count, ptr) );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -268,16 +284,16 @@ _cogl_boxed_value_set_uniform (CoglContext *ctx,
|
|||||||
switch (value->size)
|
switch (value->size)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
ctx->glUniformMatrix2fv (location, value->count,
|
GE( ctx, glUniformMatrix2fv (location, value->count,
|
||||||
value->transpose, ptr);
|
value->transpose, ptr) );
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ctx->glUniformMatrix3fv (location, value->count,
|
GE( ctx, glUniformMatrix3fv (location, value->count,
|
||||||
value->transpose, ptr);
|
value->transpose, ptr) );
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
ctx->glUniformMatrix4fv (location, value->count,
|
GE( ctx, glUniformMatrix4fv (location, value->count,
|
||||||
value->transpose, ptr);
|
value->transpose, ptr) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user