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 108:565de331ccec
prev103:9b9cfc5855e0
next112:a3008ac0765a
author nkeynes
date Wed Mar 15 13:16:50 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change More video WIP - displays _something_ now, at least...
file annotate diff log raw
1.1 --- a/src/drivers/video_x11.c Mon Mar 13 12:39:07 2006 +0000
1.2 +++ b/src/drivers/video_x11.c Wed Mar 15 13:16:50 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: video_x11.c,v 1.2 2006-03-13 12:39:07 nkeynes Exp $
1.6 + * $Id: video_x11.c,v 1.3 2006-03-15 13:16:46 nkeynes Exp $
1.7 *
1.8 * Shared functions for all X11-based display drivers.
1.9 *
1.10 @@ -129,6 +129,27 @@
1.11 return TRUE;
1.12 }
1.13
1.14 +int video_glx_load_font( const gchar *font_name )
1.15 +{
1.16 + int lists;
1.17 + XFontStruct *font = XLoadQueryFont(video_x11_display, font_name );
1.18 + if (font == NULL)
1.19 + return -1;
1.20 +
1.21 + lists = glGenLists(96);
1.22 + glXUseXFont(font->fid, 32, 96, lists);
1.23 + XFreeFont(video_x11_display, font);
1.24 +}
1.25 +
1.26 +
1.27 +
1.28 +gboolean video_glx_set_render_format( int x, int y, int width, int height )
1.29 +{
1.30 + if( glx_open )
1.31 + return TRUE;
1.32 + return video_glx_create_window( x, y, width, height );
1.33 +}
1.34 +
1.35 void video_glx_swap_buffers( void )
1.36 {
1.37 glXSwapBuffers( video_x11_display, glx_window );
.