Search
lxdream.org :: lxdream :: r1233:06923d1020de
lxdream 0.9.1
released Jun 29
Download Now
changeset1233:06923d1020de
parent1232:e5b12e2fe6ba
child1234:1b836bf92653
authornkeynes
dateThu Feb 23 22:40:50 2012 +1000 (12 years ago)
Fix non-shader rendering
src/pvr2/glrender.c
src/pvr2/pvr2.h
src/pvr2/texcache.c
1.1 --- a/src/pvr2/glrender.c Thu Feb 23 22:20:15 2012 +1000
1.2 +++ b/src/pvr2/glrender.c Thu Feb 23 22:40:50 2012 +1000
1.3 @@ -123,7 +123,7 @@
1.4 #ifdef APPLE_BUILD
1.5 CGL_MACRO_CONTEXT = CGLGetCurrentContext();
1.6 #endif
1.7 - texcache_gl_init(); // Allocate texture IDs
1.8 + texcache_gl_init(have_shaders); // Allocate texture IDs
1.9 glDisable( GL_CULL_FACE );
1.10 glEnable( GL_BLEND );
1.11 glEnable( GL_DEPTH_TEST );
1.12 @@ -441,7 +441,7 @@
1.13 /* Vertex array pointers */
1.14 glVertexPointer(3, GL_FLOAT, sizeof(struct vertex_struct), &pvr2_scene.vertex_array[0].x);
1.15 glColorPointer(4, GL_FLOAT, sizeof(struct vertex_struct), &pvr2_scene.vertex_array[0].rgba[0]);
1.16 - glTexCoordPointer(4, GL_FLOAT, sizeof(struct vertex_struct), &pvr2_scene.vertex_array[0].u);
1.17 + glTexCoordPointer(2, GL_FLOAT, sizeof(struct vertex_struct), &pvr2_scene.vertex_array[0].u);
1.18 glSecondaryColorPointerEXT(3, GL_FLOAT, sizeof(struct vertex_struct), pvr2_scene.vertex_array[0].offset_rgba );
1.19 glFogCoordPointerEXT(GL_FLOAT, sizeof(struct vertex_struct), &pvr2_scene.vertex_array[0].offset_rgba[3] );
1.20 }
2.1 --- a/src/pvr2/pvr2.h Thu Feb 23 22:20:15 2012 +1000
2.2 +++ b/src/pvr2/pvr2.h Thu Feb 23 22:40:50 2012 +1000
2.3 @@ -316,7 +316,7 @@
2.4 /**
2.5 * Initialize the GL side of the texture cache (texture ids and such).
2.6 */
2.7 -void texcache_gl_init( void );
2.8 +void texcache_gl_init( gboolean withShaders );
2.9
2.10 /**
2.11 * Flush all textures and delete. The cache will be non-functional until
3.1 --- a/src/pvr2/texcache.c Thu Feb 23 22:20:15 2012 +1000
3.2 +++ b/src/pvr2/texcache.c Thu Feb 23 22:40:50 2012 +1000
3.3 @@ -89,12 +89,12 @@
3.4 * Setup the initial texture ids (must be called after the GL context is
3.5 * prepared)
3.6 */
3.7 -void texcache_gl_init( )
3.8 +void texcache_gl_init( gboolean withShaders )
3.9 {
3.10 int i;
3.11 GLuint texids[MAX_TEXTURES];
3.12
3.13 - if( glsl_is_supported() && isGLMultitextureSupported() ) {
3.14 + if( withShaders ) {
3.15 texcache_have_palette_shader = TRUE;
3.16 texcache_palette_valid = FALSE;
3.17 glGenTextures(1, &texcache_palette_texid );
.