[cogl/wip/neil/pipeline-uniforms: 10/15] cogl-boxed-value: Wrap the GL calls in the GE() macro
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/neil/pipeline-uniforms: 10/15] cogl-boxed-value: Wrap the GL calls in the GE() macro
- Date: Fri, 4 Nov 2011 13:36:47 +0000 (UTC)
commit ee6f477e6fe50882f9fd53a92545ac2f5fdb8a7d
Author: Neil Roberts <neil linux intel com>
Date: Thu Nov 3 16:42:06 2011 +0000
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.
cogl/cogl-boxed-value.c | 44 ++++++++++++++++++++++++++++++--------------
1 files changed, 30 insertions(+), 14 deletions(-)
---
diff --git a/cogl/cogl-boxed-value.c b/cogl/cogl-boxed-value.c
index 5beaa45..a728caa 100644
--- a/cogl/cogl-boxed-value.c
+++ b/cogl/cogl-boxed-value.c
@@ -229,10 +229,18 @@ _cogl_boxed_value_set_uniform (CoglContext *ctx,
switch (value->size)
{
- case 1: ctx->glUniform1iv (location, value->count, ptr); break;
- case 2: ctx->glUniform2iv (location, value->count, ptr); break;
- case 3: ctx->glUniform3iv (location, value->count, ptr); break;
- case 4: ctx->glUniform4iv (location, value->count, ptr); break;
+ case 1:
+ GE( ctx, glUniform1iv (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;
@@ -248,10 +256,18 @@ _cogl_boxed_value_set_uniform (CoglContext *ctx,
switch (value->size)
{
- case 1: ctx->glUniform1fv (location, value->count, ptr); break;
- case 2: ctx->glUniform2fv (location, value->count, ptr); break;
- case 3: ctx->glUniform3fv (location, value->count, ptr); break;
- case 4: ctx->glUniform4fv (location, value->count, ptr); break;
+ case 1:
+ GE( ctx, glUniform1fv (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;
@@ -268,16 +284,16 @@ _cogl_boxed_value_set_uniform (CoglContext *ctx,
switch (value->size)
{
case 2:
- ctx->glUniformMatrix2fv (location, value->count,
- value->transpose, ptr);
+ GE( ctx, glUniformMatrix2fv (location, value->count,
+ value->transpose, ptr) );
break;
case 3:
- ctx->glUniformMatrix3fv (location, value->count,
- value->transpose, ptr);
+ GE( ctx, glUniformMatrix3fv (location, value->count,
+ value->transpose, ptr) );
break;
case 4:
- ctx->glUniformMatrix4fv (location, value->count,
- value->transpose, ptr);
+ GE( ctx, glUniformMatrix4fv (location, value->count,
+ value->transpose, ptr) );
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]