Search
lxdream.org :: lxdream/src/drivers/video_x11.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_x11.c
changeset 160:17c4c0e4f9ce
prev144:7f0714e89aaa
next280:715202395e0f
author nkeynes
date Sun Jun 18 11:55:25 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change Change video blank to use GL, ie to actually work
file annotate diff log raw
1.1 --- a/src/drivers/video_x11.c Mon May 15 08:28:52 2006 +0000
1.2 +++ b/src/drivers/video_x11.c Sun Jun 18 11:55:25 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: video_x11.c,v 1.5 2006-05-15 08:28:52 nkeynes Exp $
1.6 + * $Id: video_x11.c,v 1.6 2006-06-18 11:55:25 nkeynes Exp $
1.7 *
1.8 * Shared functions for all X11-based display drivers.
1.9 *
1.10 @@ -182,6 +182,21 @@
1.11 return TRUE;
1.12 }
1.13
1.14 +gboolean video_glx_blank( int width, int height, uint32_t colour )
1.15 +{
1.16 + glDrawBuffer( GL_FRONT );
1.17 + glViewport( 0, 0, width, height );
1.18 + glMatrixMode( GL_PROJECTION );
1.19 + glLoadIdentity();
1.20 + glOrtho( 0, width, height, 0, 0, -65535 );
1.21 + glMatrixMode(GL_MODELVIEW);
1.22 + glLoadIdentity();
1.23 + glColor3b( (colour >> 16) & 0xFF, (colour >> 8) & 0xFF, colour & 0xFF );
1.24 + glRecti(0,0, width, height );
1.25 + glFlush();
1.26 + return TRUE;
1.27 +}
1.28 +
1.29 void video_glx_swap_buffers( void )
1.30 {
1.31 glXSwapBuffers( video_x11_display, glx_window );
.