filename | src/drivers/gl_glx.c |
changeset | 94:8d80d9c7cc7d |
next | 96:3ec45b6525ba |
author | nkeynes |
date | Sun Feb 05 04:05:27 2006 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Video code reshuffle to start getting real video happening. Implement colourspace conversions Various tweaks |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/src/drivers/gl_glx.c Sun Feb 05 04:05:27 2006 +00001.3 @@ -0,0 +1,56 @@1.4 +/**1.5 + * $Id: gl_glx.c,v 1.1 2006-02-05 04:05:27 nkeynes Exp $1.6 + *1.7 + * GLX framebuffer support. Note depends on an X11 video driver1.8 + * (ie video_gtk) to maintain the X11 side of things.1.9 + *1.10 + * Copyright (c) 2005 Nathan Keynes.1.11 + *1.12 + * This program is free software; you can redistribute it and/or modify1.13 + * it under the terms of the GNU General Public License as published by1.14 + * the Free Software Foundation; either version 2 of the License, or1.15 + * (at your option) any later version.1.16 + *1.17 + * This program is distributed in the hope that it will be useful,1.18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of1.19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1.20 + * GNU General Public License for more details.1.21 + */1.22 +1.23 +#include "dream.h"1.24 +#include <X11/Xlib.h>1.25 +#include <GL/glx.h>1.26 +#include "video.h"1.27 +#include "drivers/video_x11.h"1.28 +1.29 +gboolean gl_glx_init( )1.30 +{1.31 + int major, minor;1.32 + const char *glxExts, *glxServer;1.33 + int screen = XScreenNumberOfScreen(video_x11_screen);1.34 +1.35 + if( glXQueryVersion( video_x11_display, &major, &minor ) == False ) {1.36 + ERROR( "X Display lacks the GLX nature" );1.37 + return FALSE;1.38 + }1.39 + if( major < 1 || minor < 1 ) {1.40 + ERROR( "GLX version %d.%d is not supported", major, minor );1.41 + return FALSE;1.42 + }1.43 +1.44 + glxExts = glXQueryExtensionsString( video_x11_display, screen );1.45 + glxServer = glXQueryServerString( video_x11_display, screen, GLX_VENDOR );1.46 + INFO( "GLX version %d.%d, %s. Supported exts: %s", major, minor,1.47 + glxServer, glxExts );1.48 +}1.49 +1.50 +gboolean gl_glx_start_frame( uint32_t width, uint32_t height,1.51 + int colour_format )1.52 +{1.53 + return FALSE;1.54 +}1.55 +1.56 +gboolean gl_glx_swap_frame( )1.57 +{1.58 + return FALSE;1.59 +}
.