Search
lxdream.org :: lxdream/src/drivers/video_glx.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_glx.h
changeset 561:533f6b478071
prev545:fdcdcd8b9fd1
next736:a02d1475ccfd
author nkeynes
date Wed Apr 16 10:12:12 2008 +0000 (16 years ago)
permissions -rw-r--r--
last change Add support for the pulseaudio sound system
file annotate diff log raw
nkeynes@545
     1
/**
nkeynes@561
     2
 * $Id$
nkeynes@545
     3
 *
nkeynes@545
     4
 * Parent for all glx-based display drivers.
nkeynes@545
     5
 *
nkeynes@545
     6
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@545
     7
 *
nkeynes@545
     8
 * This program is free software; you can redistribute it and/or modify
nkeynes@545
     9
 * it under the terms of the GNU General Public License as published by
nkeynes@545
    10
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@545
    11
 * (at your option) any later version.
nkeynes@545
    12
 *
nkeynes@545
    13
 * This program is distributed in the hope that it will be useful,
nkeynes@545
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@545
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@545
    16
 * GNU General Public License for more details.
nkeynes@545
    17
 */
nkeynes@545
    18
nkeynes@545
    19
#ifndef video_glx_driver_H
nkeynes@545
    20
#define video_glx_driver_H
nkeynes@545
    21
nkeynes@545
    22
#include "X11/Xlib.h"
nkeynes@545
    23
#include "display.h"
nkeynes@545
    24
nkeynes@545
    25
/**
nkeynes@545
    26
 * Initialize GLX support. Detect capabilities, visuals, etc. 
nkeynes@545
    27
 * Must be called before any other GLX functions
nkeynes@545
    28
 */
nkeynes@545
    29
gboolean video_glx_init( Display *display, int screen );
nkeynes@545
    30
nkeynes@545
    31
/**
nkeynes@545
    32
 * Return the prefered visual to be used for the GL window.
nkeynes@545
    33
 * (Not using this for the render window may cause init context
nkeynes@545
    34
 * to fail).
nkeynes@545
    35
 */
nkeynes@545
    36
XVisualInfo *video_glx_get_visual();
nkeynes@545
    37
nkeynes@545
    38
/**
nkeynes@545
    39
 * Initialize the GLX context and bind to the specified window.
nkeynes@545
    40
 * (which should have been created with the visual returned above).
nkeynes@545
    41
 */
nkeynes@545
    42
gboolean video_glx_init_context( Display *display, Window window );
nkeynes@545
    43
nkeynes@545
    44
/**
nkeynes@545
    45
 * Initialize the display driver by setting the appropriate methods
nkeynes@545
    46
 * for GLX support
nkeynes@545
    47
 */
nkeynes@545
    48
gboolean video_glx_init_driver( display_driver_t driver );
nkeynes@545
    49
nkeynes@545
    50
/**
nkeynes@545
    51
 * Shutdown GLX support and release all resources.
nkeynes@545
    52
 */
nkeynes@545
    53
void video_glx_shutdown();
nkeynes@545
    54
nkeynes@545
    55
#endif
.