Search
lxdream.org :: lxdream/src/drivers/gl_glx.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/gl_glx.c
changeset 94:8d80d9c7cc7d
next96:3ec45b6525ba
author nkeynes
date Sun Feb 05 04:05:27 2006 +0000 (15 years ago)
permissions -rw-r--r--
last change Video code reshuffle to start getting real video happening.
Implement colourspace conversions
Various tweaks
view annotate diff log raw
     1 /**
     2  * $Id: gl_glx.c,v 1.1 2006-02-05 04:05:27 nkeynes Exp $
     3  *
     4  * GLX framebuffer support. Note depends on an X11 video driver 
     5  * (ie video_gtk) to maintain the X11 side of things.
     6  *
     7  * Copyright (c) 2005 Nathan Keynes.
     8  *
     9  * This program is free software; you can redistribute it and/or modify
    10  * it under the terms of the GNU General Public License as published by
    11  * the Free Software Foundation; either version 2 of the License, or
    12  * (at your option) any later version.
    13  *
    14  * This program is distributed in the hope that it will be useful,
    15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    17  * GNU General Public License for more details.
    18  */
    20 #include "dream.h"
    21 #include <X11/Xlib.h>
    22 #include <GL/glx.h>
    23 #include "video.h"
    24 #include "drivers/video_x11.h"
    26 gboolean gl_glx_init( )
    27 {
    28     int major, minor;
    29     const char *glxExts, *glxServer;
    30     int screen = XScreenNumberOfScreen(video_x11_screen);
    32     if( glXQueryVersion( video_x11_display, &major, &minor ) == False ) {
    33 	ERROR( "X Display lacks the GLX nature" );
    34 	return FALSE;
    35     }
    36     if( major < 1 || minor < 1 ) {
    37 	ERROR( "GLX version %d.%d is not supported", major, minor );
    38 	return FALSE;
    39     }
    41     glxExts = glXQueryExtensionsString( video_x11_display, screen );
    42     glxServer = glXQueryServerString( video_x11_display, screen, GLX_VENDOR );
    43     INFO( "GLX version %d.%d, %s. Supported exts: %s", major, minor,
    44 	  glxServer, glxExts );
    45 }
    47 gboolean gl_glx_start_frame( uint32_t width, uint32_t height,
    48 			     int colour_format )
    49 {
    50     return FALSE;
    51 }
    53 gboolean gl_glx_swap_frame( )
    54 {
    55     return FALSE;
    56 }
.