nkeynes@545: /** nkeynes@561: * $Id$ nkeynes@545: * nkeynes@545: * Parent for all glx-based display drivers. nkeynes@545: * nkeynes@545: * Copyright (c) 2005 Nathan Keynes. nkeynes@545: * nkeynes@545: * This program is free software; you can redistribute it and/or modify nkeynes@545: * it under the terms of the GNU General Public License as published by nkeynes@545: * the Free Software Foundation; either version 2 of the License, or nkeynes@545: * (at your option) any later version. nkeynes@545: * nkeynes@545: * This program is distributed in the hope that it will be useful, nkeynes@545: * but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@545: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@545: * GNU General Public License for more details. nkeynes@545: */ nkeynes@545: nkeynes@736: #ifndef lxdream_video_glx_H nkeynes@736: #define lxdream_video_glx_H 1 nkeynes@545: nkeynes@545: #include "X11/Xlib.h" nkeynes@545: #include "display.h" nkeynes@545: nkeynes@736: #ifdef __cplusplus nkeynes@736: extern "C" { nkeynes@736: #endif nkeynes@736: nkeynes@545: /** nkeynes@545: * Initialize GLX support. Detect capabilities, visuals, etc. nkeynes@545: * Must be called before any other GLX functions nkeynes@545: */ nkeynes@545: gboolean video_glx_init( Display *display, int screen ); nkeynes@545: nkeynes@545: /** nkeynes@545: * Return the prefered visual to be used for the GL window. nkeynes@545: * (Not using this for the render window may cause init context nkeynes@545: * to fail). nkeynes@545: */ nkeynes@545: XVisualInfo *video_glx_get_visual(); nkeynes@545: nkeynes@545: /** nkeynes@545: * Initialize the GLX context and bind to the specified window. nkeynes@545: * (which should have been created with the visual returned above). nkeynes@545: */ nkeynes@545: gboolean video_glx_init_context( Display *display, Window window ); nkeynes@545: nkeynes@545: /** nkeynes@545: * Initialize the display driver by setting the appropriate methods nkeynes@545: * for GLX support nkeynes@545: */ nkeynes@545: gboolean video_glx_init_driver( display_driver_t driver ); nkeynes@545: nkeynes@545: /** nkeynes@545: * Shutdown GLX support and release all resources. nkeynes@545: */ nkeynes@545: void video_glx_shutdown(); nkeynes@545: nkeynes@736: #ifdef __cplusplus nkeynes@736: } nkeynes@545: #endif nkeynes@736: nkeynes@736: #endif