Search
lxdream.org :: lxdream :: r160:17c4c0e4f9ce
lxdream 0.9.1
released Jun 29
Download Now
changeset160:17c4c0e4f9ce
parent159:406161fea392
child161:408b9210395f
authornkeynes
dateSun Jun 18 11:55:25 2006 +0000 (14 years ago)
Change video blank to use GL, ie to actually work
src/drivers/video_gtk.c
src/drivers/video_x11.c
1.1 --- a/src/drivers/video_gtk.c Thu Jun 15 10:33:08 2006 +0000
1.2 +++ b/src/drivers/video_gtk.c Sun Jun 18 11:55:25 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: video_gtk.c,v 1.6 2006-05-15 08:28:52 nkeynes Exp $
1.6 + * $Id: video_gtk.c,v 1.7 2006-06-18 11:55:25 nkeynes Exp $
1.7 *
1.8 * The PC side of the video support (responsible for actually displaying /
1.9 * rendering frames)
1.10 @@ -111,14 +111,7 @@
1.11 */
1.12 gboolean video_gtk_blank( uint32_t colour )
1.13 {
1.14 - char *p = video_img->mem;
1.15 - int i;
1.16 - for( i=0; i<video_width*video_height; i++ ) {
1.17 - *p++ = (colour>>16) & 0xFF;
1.18 - *p++ = (colour>>8) & 0xFF;
1.19 - *p++ = (colour) & 0xFF;
1.20 - *p++ = 0;
1.21 - }
1.22 + video_glx_blank( video_width, video_height, colour );
1.23 }
1.24
1.25 gboolean video_gtk_display_frame( video_buffer_t frame )
2.1 --- a/src/drivers/video_x11.c Thu Jun 15 10:33:08 2006 +0000
2.2 +++ b/src/drivers/video_x11.c Sun Jun 18 11:55:25 2006 +0000
2.3 @@ -1,5 +1,5 @@
2.4 /**
2.5 - * $Id: video_x11.c,v 1.5 2006-05-15 08:28:52 nkeynes Exp $
2.6 + * $Id: video_x11.c,v 1.6 2006-06-18 11:55:25 nkeynes Exp $
2.7 *
2.8 * Shared functions for all X11-based display drivers.
2.9 *
2.10 @@ -182,6 +182,21 @@
2.11 return TRUE;
2.12 }
2.13
2.14 +gboolean video_glx_blank( int width, int height, uint32_t colour )
2.15 +{
2.16 + glDrawBuffer( GL_FRONT );
2.17 + glViewport( 0, 0, width, height );
2.18 + glMatrixMode( GL_PROJECTION );
2.19 + glLoadIdentity();
2.20 + glOrtho( 0, width, height, 0, 0, -65535 );
2.21 + glMatrixMode(GL_MODELVIEW);
2.22 + glLoadIdentity();
2.23 + glColor3b( (colour >> 16) & 0xFF, (colour >> 8) & 0xFF, colour & 0xFF );
2.24 + glRecti(0,0, width, height );
2.25 + glFlush();
2.26 + return TRUE;
2.27 +}
2.28 +
2.29 void video_glx_swap_buffers( void )
2.30 {
2.31 glXSwapBuffers( video_x11_display, glx_window );
.