Search
lxdream.org :: lxdream/src/pvr2/glrender.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glrender.c
changeset 1207:f7ca985659c6
prev1205:a486ac64f34b
next1219:3966d3e55351
author nkeynes
date Tue Feb 07 11:20:00 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Gen helper functions for uniform + attribute variables, along with the main
program use, to provide a more usable interface to the shaders
file annotate diff log raw
1.1 --- a/src/pvr2/glrender.c Mon Jan 30 20:11:08 2012 +1000
1.2 +++ b/src/pvr2/glrender.c Tue Feb 07 11:20:00 2012 +1000
1.3 @@ -24,6 +24,7 @@
1.4 #include "pvr2/glutil.h"
1.5 #include "pvr2/scene.h"
1.6 #include "pvr2/tileiter.h"
1.7 +#include "pvr2/shaders.h"
1.8
1.9 #ifdef APPLE_BUILD
1.10 #include "OpenGL/CGLCurrent.h"
1.11 @@ -160,9 +161,9 @@
1.12 glFogf(GL_FOG_END, 1.0);
1.13
1.14 if( have_shaders ) {
1.15 - glsl_set_shader(DEFAULT_PROGRAM);
1.16 - glsl_set_uniform_int(DEFAULT_PROGRAM, "primary_texture", 0);
1.17 - glsl_set_uniform_int(DEFAULT_PROGRAM, "palette_texture", 1);
1.18 + glsl_use_pvr2_shader();
1.19 + glsl_set_pvr2_shader_primary_texture(0);
1.20 + glsl_set_pvr2_shader_palette_texture(1);
1.21 glsl_clear_shader();
1.22 }
1.23 }
1.24 @@ -460,7 +461,7 @@
1.25 glSecondaryColorPointerEXT(3, GL_FLOAT, sizeof(struct vertex_struct), pvr2_scene.vertex_array[0].offset_rgba );
1.26 glFogCoordPointerEXT(GL_FLOAT, sizeof(struct vertex_struct), &pvr2_scene.vertex_array[0].offset_rgba[3] );
1.27 /* Turn on the shaders (if available) */
1.28 - glsl_set_shader(DEFAULT_PROGRAM);
1.29 + glsl_use_pvr2_shader();
1.30
1.31 /* Render the background */
1.32 gl_render_bkgnd( pvr2_scene.bkgnd_poly );
.