Search
lxdream.org :: lxdream :: r665:99ae9dc4cab7
lxdream 0.9.1
released Jun 29
Download Now
changeset665:99ae9dc4cab7
parent664:728508bb08df
child666:ea369bcf6def
authornkeynes
dateSat Apr 19 00:36:36 2008 +0000 (11 years ago)
Move glsl setup out of the drivers
Move pvr2 setup call up to video_gtk (probably needs to go higher really)
src/drivers/video_glx.c
src/drivers/video_gtk.c
src/drivers/video_nsgl.c
src/pvr2/glrender.c
1.1 --- a/src/drivers/video_glx.c Thu Apr 17 11:01:29 2008 +0000
1.2 +++ b/src/drivers/video_glx.c Sat Apr 19 00:36:36 2008 +0000
1.3 @@ -170,14 +170,6 @@
1.4 WARN( "Not using direct rendering - this is likely to be slow" );
1.5 }
1.6
1.7 - if( glsl_is_supported() ) {
1.8 - //if( !glsl_load_shaders( glsl_vertex_shader_src, glsl_fragment_shader_src ) ) {
1.9 - if( !glsl_load_shaders( glsl_vertex_shader_src, NULL ) ) {
1.10 - WARN( "Unable to load GL shaders" );
1.11 - }
1.12 - }
1.13 -
1.14 - pvr2_setup_gl_context();
1.15 video_x11_display = display;
1.16 video_x11_window = window;
1.17
2.1 --- a/src/drivers/video_gtk.c Thu Apr 17 11:01:29 2008 +0000
2.2 +++ b/src/drivers/video_gtk.c Sat Apr 19 00:36:36 2008 +0000
2.3 @@ -296,6 +296,8 @@
2.4 #endif
2.5 #endif
2.6
2.7 + pvr2_setup_gl_context();
2.8 +
2.9 #ifdef HAVE_LINUX_JOYSTICK
2.10 linux_joystick_init();
2.11 #endif
3.1 --- a/src/drivers/video_nsgl.c Thu Apr 17 11:01:29 2008 +0000
3.2 +++ b/src/drivers/video_nsgl.c Sat Apr 19 00:36:36 2008 +0000
3.3 @@ -44,12 +44,7 @@
3.4 ERROR( "FBO not supported" );
3.5 return FALSE;
3.6 }
3.7 -
3.8 - if( glsl_is_supported() ) {
3.9 - if( !glsl_load_shaders( glsl_vertex_shader_src, NULL ) ) {
3.10 - WARN( "Unable to load GL shaders" );
3.11 - }
3.12 - }
3.13 +
3.14 return TRUE;
3.15 }
3.16
4.1 --- a/src/pvr2/glrender.c Thu Apr 17 11:01:29 2008 +0000
4.2 +++ b/src/pvr2/glrender.c Sat Apr 19 00:36:36 2008 +0000
4.3 @@ -20,6 +20,7 @@
4.4 #include "display.h"
4.5 #include "pvr2/pvr2.h"
4.6 #include "pvr2/scene.h"
4.7 +#include "pvr2/glutil.h"
4.8
4.9 int pvr2_poly_depthmode[8] = { GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL,
4.10 GL_GREATER, GL_NOTEQUAL, GL_GEQUAL,
4.11 @@ -84,6 +85,13 @@
4.12 */
4.13 void pvr2_setup_gl_context()
4.14 {
4.15 +
4.16 + if( glsl_is_supported() ) {
4.17 + if( !glsl_load_shaders( glsl_vertex_shader_src, NULL ) ) {
4.18 + WARN( "Unable to load GL shaders" );
4.19 + }
4.20 + }
4.21 +
4.22 texcache_gl_init(); // Allocate texture IDs
4.23 glCullFace( GL_BACK );
4.24 glEnable( GL_BLEND );
.