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 327:00d55a462af3
prev317:7c90a7dc139b
next335:fb890e1814c0
author nkeynes
date Thu Jan 25 11:46:35 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Cleanup framebuffer formats by adding a central source for the information
file annotate diff log raw
1.1 --- a/src/drivers/video_x11.c Tue Jan 23 11:21:21 2007 +0000
1.2 +++ b/src/drivers/video_x11.c Thu Jan 25 11:46:35 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: video_x11.c,v 1.9 2007-01-23 11:21:21 nkeynes Exp $
1.6 + * $Id: video_x11.c,v 1.10 2007-01-25 11:46:35 nkeynes Exp $
1.7 *
1.8 * Shared functions for all X11-based display drivers.
1.9 *
1.10 @@ -152,22 +152,9 @@
1.11
1.12 gboolean video_glx_display_frame( video_buffer_t frame )
1.13 {
1.14 - GLenum type, format = GL_BGR;
1.15 - switch( frame->colour_format ) {
1.16 - case COLFMT_RGB565:
1.17 - type = GL_UNSIGNED_SHORT_5_6_5;
1.18 - break;
1.19 - case COLFMT_RGB888:
1.20 - type = GL_UNSIGNED_BYTE;
1.21 - break;
1.22 - case COLFMT_ARGB1555:
1.23 - type = GL_UNSIGNED_SHORT_5_5_5_1;
1.24 - break;
1.25 - case COLFMT_ARGB8888:
1.26 - format = GL_BGRA;
1.27 - type = GL_UNSIGNED_INT_8_8_8_8_REV;
1.28 - break;
1.29 - }
1.30 + GLenum type = colour_formats[frame->colour_format].type;
1.31 + GLenum format = colour_formats[frame->colour_format].format;
1.32 +
1.33 glDrawBuffer( GL_FRONT );
1.34 glViewport( 0, 0, frame->hres, frame->vres );
1.35 glMatrixMode(GL_PROJECTION);
.