Search
lxdream.org :: lxdream/src/drivers/video_glx.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_glx.h
changeset 545:fdcdcd8b9fd1
next561:533f6b478071
author nkeynes
date Thu Dec 06 10:43:30 2007 +0000 (16 years ago)
permissions -rw-r--r--
last change Add support for the MMIO side of the TLB (and LDTLB)
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/drivers/video_glx.h Thu Dec 06 10:43:30 2007 +0000
1.3 @@ -0,0 +1,55 @@
1.4 +/**
1.5 + * $Id: video_glx.h,v 1.5 2007-09-08 04:05:35 nkeynes Exp $
1.6 + *
1.7 + * Parent for all glx-based display drivers.
1.8 + *
1.9 + * Copyright (c) 2005 Nathan Keynes.
1.10 + *
1.11 + * This program is free software; you can redistribute it and/or modify
1.12 + * it under the terms of the GNU General Public License as published by
1.13 + * the Free Software Foundation; either version 2 of the License, or
1.14 + * (at your option) any later version.
1.15 + *
1.16 + * This program is distributed in the hope that it will be useful,
1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.20 + */
1.21 +
1.22 +#ifndef video_glx_driver_H
1.23 +#define video_glx_driver_H
1.24 +
1.25 +#include "X11/Xlib.h"
1.26 +#include "display.h"
1.27 +
1.28 +/**
1.29 + * Initialize GLX support. Detect capabilities, visuals, etc.
1.30 + * Must be called before any other GLX functions
1.31 + */
1.32 +gboolean video_glx_init( Display *display, int screen );
1.33 +
1.34 +/**
1.35 + * Return the prefered visual to be used for the GL window.
1.36 + * (Not using this for the render window may cause init context
1.37 + * to fail).
1.38 + */
1.39 +XVisualInfo *video_glx_get_visual();
1.40 +
1.41 +/**
1.42 + * Initialize the GLX context and bind to the specified window.
1.43 + * (which should have been created with the visual returned above).
1.44 + */
1.45 +gboolean video_glx_init_context( Display *display, Window window );
1.46 +
1.47 +/**
1.48 + * Initialize the display driver by setting the appropriate methods
1.49 + * for GLX support
1.50 + */
1.51 +gboolean video_glx_init_driver( display_driver_t driver );
1.52 +
1.53 +/**
1.54 + * Shutdown GLX support and release all resources.
1.55 + */
1.56 +void video_glx_shutdown();
1.57 +
1.58 +#endif
.