revision 1233:06923d1020de
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 1233:06923d1020de |
parent | 1232:e5b12e2fe6ba |
child | 1234:1b836bf92653 |
author | nkeynes |
date | Thu Feb 23 22:40:50 2012 +1000 (12 years ago) |
Fix non-shader rendering
src/pvr2/glrender.c | view | annotate | diff | log | ||
src/pvr2/pvr2.h | view | annotate | diff | log | ||
src/pvr2/texcache.c | view | annotate | diff | log |
1.1 --- a/src/pvr2/glrender.c Thu Feb 23 22:20:15 2012 +10001.2 +++ b/src/pvr2/glrender.c Thu Feb 23 22:40:50 2012 +10001.3 @@ -123,7 +123,7 @@1.4 #ifdef APPLE_BUILD1.5 CGL_MACRO_CONTEXT = CGLGetCurrentContext();1.6 #endif1.7 - texcache_gl_init(); // Allocate texture IDs1.8 + texcache_gl_init(have_shaders); // Allocate texture IDs1.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 +10002.2 +++ b/src/pvr2/pvr2.h Thu Feb 23 22:40:50 2012 +10002.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.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 +10003.2 +++ b/src/pvr2/texcache.c Thu Feb 23 22:40:50 2012 +10003.3 @@ -89,12 +89,12 @@3.4 * Setup the initial texture ids (must be called after the GL context is3.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.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 );
.