Search
lxdream.org :: lxdream/src/pvr2/gl_sl.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/gl_sl.c
changeset 1166:f405d42a9786
prev1140:7dc1c71ece76
next1203:d8519911fb40
author nkeynes
date Fri Jan 28 16:14:57 2011 +1000 (8 years ago)
permissions -rw-r--r--
last change Perform the sanity checks for FBOs and shaders up front rather than on every
use, and remove surplus glGetError() calls
file annotate diff log raw
1.1 --- a/src/pvr2/gl_sl.c Tue Oct 26 08:39:02 2010 +1000
1.2 +++ b/src/pvr2/gl_sl.c Fri Jan 28 16:14:57 2011 +1000
1.3 @@ -139,7 +139,6 @@
1.4 void glsl_use_program(gl_program_t program)
1.5 {
1.6 glUseProgramObjectARB(program);
1.7 - glsl_check_program_error( "Failed to activate shader program", program );
1.8 }
1.9
1.10 void glsl_destroy_shader(gl_shader_t shader)
1.11 @@ -376,6 +375,11 @@
1.12 ok = FALSE;
1.13 break;
1.14 } else {
1.15 + /* Check that we can actually use the program (can this really fail?) */
1.16 + glsl_use_program(program);
1.17 + if( !glsl_check_program_error( "Failed to activate shader program", program ) ) {
1.18 + ok = FALSE;
1.19 + }
1.20 program_array[i] = program;
1.21 }
1.22 }
1.23 @@ -396,6 +400,8 @@
1.24 glsl_unload_shaders();
1.25 return FALSE;
1.26 }
1.27 +
1.28 + glsl_use_program(0);
1.29 return TRUE;
1.30 }
1.31
.