Search
lxdream.org :: lxdream/src/tools/genglsl.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/tools/genglsl.c
changeset 1229:dc935eee9767
prev1209:e606e65eaf54
next1234:1b836bf92653
author nkeynes
date Thu Feb 23 19:43:24 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Add missing float uniform type
Fix previous sl cleanup being called after new sl setup is done
file annotate diff log raw
1.1 --- a/src/tools/genglsl.c Tue Feb 07 11:59:07 2012 +1000
1.2 +++ b/src/tools/genglsl.c Thu Feb 23 19:43:24 2012 +1000
1.3 @@ -244,6 +244,7 @@
1.4
1.5 static const char *sl_type_map[][3] = {
1.6 {"int", "int", "int *"},
1.7 + {"float", "float", "float *"},
1.8 {"short", "short", "short *"},
1.9 {"sampler", "int", "int *"},
1.10 {"vec", "GLfloat *", "GLfloat *"},
1.11 @@ -387,13 +388,13 @@
1.12
1.13 fprintf( f, "\nvoid glsl_use_%s() {\n", program->name );
1.14 fprintf( f, " glsl_use_program(prog_%s_id);\n", program->name );
1.15 + fprintf( f, " glsl_set_cleanup_fn(glsl_cleanup_%s);\n", program->name );
1.16 for( var_ptr = program->variables; var_ptr != NULL; var_ptr = var_ptr->next ) {
1.17 variable_t var = var_ptr->data;
1.18 if( !var->uniform ) {
1.19 fprintf( f, " glsl_enable_attrib(var_%s_%s_loc);\n", program->name, var->name );
1.20 }
1.21 }
1.22 - fprintf( f, " glsl_set_cleanup_fn(glsl_cleanup_%s);\n", program->name );
1.23 fprintf( f, "}\n");
1.24
1.25
.