Search
lxdream.org :: lxdream/src/pvr2/glrender.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glrender.c
changeset 1251:b8ab59d39756
prev1242:67909902ede9
next1256:a9d29fe74bf3
author nkeynes
date Sat Mar 03 16:11:28 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Support depth component 16 as well as 24 (add capability flag for the available bits)
Put remaining TODOs inside HAVE_OPENGL_FIXEDFUNC blocks
Add swap-buffer calls for EGL (does not appear to support rendering directly
to front-buffer)
file annotate diff log raw
1.1 --- a/src/pvr2/glrender.c Tue Feb 28 17:31:26 2012 +1000
1.2 +++ b/src/pvr2/glrender.c Sat Mar 03 16:11:28 2012 +1000
1.3 @@ -73,12 +73,15 @@
1.4
1.5 static void drawrect2d( uint32_t tile_bounds[], float z )
1.6 {
1.7 + /* FIXME: Find a non-fixed-func way to do this */
1.8 +#ifdef HAVE_OPENGL_FIXEDFUNC
1.9 glBegin( GL_TRIANGLE_STRIP );
1.10 glVertex3f( tile_bounds[0], tile_bounds[2], z );
1.11 glVertex3f( tile_bounds[1], tile_bounds[2], z );
1.12 glVertex3f( tile_bounds[0], tile_bounds[3], z );
1.13 glVertex3f( tile_bounds[1], tile_bounds[3], z );
1.14 glEnd();
1.15 +#endif
1.16 }
1.17
1.18 static void pvr2_scene_load_textures()
1.19 @@ -116,8 +119,11 @@
1.20 if( !glsl_load_shaders( ) ) {
1.21 WARN( "Unable to load GL shaders" );
1.22 } else {
1.23 + INFO( "Shaders loaded successfully" );
1.24 have_shaders = TRUE;
1.25 }
1.26 + } else {
1.27 + INFO( "Shaders not supported" );
1.28 }
1.29
1.30 #ifdef APPLE_BUILD
1.31 @@ -172,9 +178,9 @@
1.32 */
1.33 static void render_set_tsp_context( uint32_t poly1, uint32_t poly2 )
1.34 {
1.35 +#ifdef HAVE_OPENGL_FIXEDFUNC
1.36 glShadeModel( POLY1_SHADE_MODEL(poly1) );
1.37
1.38 -#ifdef HAVE_OPENGL_FIXEDFUNC
1.39 if( !have_shaders ) {
1.40 if( POLY1_TEXTURED(poly1) ) {
1.41 if( POLY2_TEX_BLEND(poly2) == 2 )
.