revision 665:99ae9dc4cab7
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 665:99ae9dc4cab7 |
parent | 664:728508bb08df |
child | 666:ea369bcf6def |
author | nkeynes |
date | Sat Apr 19 00:36:36 2008 +0000 (16 years ago) |
Move glsl setup out of the drivers
Move pvr2 setup call up to video_gtk (probably needs to go higher really)
Move pvr2 setup call up to video_gtk (probably needs to go higher really)
1.1 --- a/src/drivers/video_glx.c Thu Apr 17 11:01:29 2008 +00001.2 +++ b/src/drivers/video_glx.c Sat Apr 19 00:36:36 2008 +00001.3 @@ -170,14 +170,6 @@1.4 WARN( "Not using direct rendering - this is likely to be slow" );1.5 }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;
2.1 --- a/src/drivers/video_gtk.c Thu Apr 17 11:01:29 2008 +00002.2 +++ b/src/drivers/video_gtk.c Sat Apr 19 00:36:36 2008 +00002.3 @@ -296,6 +296,8 @@2.4 #endif2.5 #endif2.7 + pvr2_setup_gl_context();2.8 +2.9 #ifdef HAVE_LINUX_JOYSTICK2.10 linux_joystick_init();2.11 #endif
3.1 --- a/src/drivers/video_nsgl.c Thu Apr 17 11:01:29 2008 +00003.2 +++ b/src/drivers/video_nsgl.c Sat Apr 19 00:36:36 2008 +00003.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 }
4.1 --- a/src/pvr2/glrender.c Thu Apr 17 11:01:29 2008 +00004.2 +++ b/src/pvr2/glrender.c Sat Apr 19 00:36:36 2008 +00004.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.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 IDs4.23 glCullFace( GL_BACK );4.24 glEnable( GL_BLEND );
.