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 736:a02d1475ccfd
prev561:533f6b478071
author nkeynes
date Mon Mar 05 11:41:03 2012 +1000 (12 years ago)
permissions -rw-r--r--
last change Small cleanups:
Refactor the post-windowing setup into gl_init_driver() in video_gl.c
Move gl_sl.c into src/drivers and tidy up a bit.
Fix OS X compiling plugins with -mdynamic-no-pic
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@736
    19
#ifndef lxdream_video_glx_H
nkeynes@736
    20
#define lxdream_video_glx_H 1
nkeynes@545
    21
nkeynes@545
    22
#include "X11/Xlib.h"
nkeynes@545
    23
#include "display.h"
nkeynes@545
    24
nkeynes@736
    25
#ifdef __cplusplus
nkeynes@736
    26
extern "C" {
nkeynes@736
    27
#endif
nkeynes@736
    28
nkeynes@545
    29
/**
nkeynes@545
    30
 * Initialize GLX support. Detect capabilities, visuals, etc. 
nkeynes@545
    31
 * Must be called before any other GLX functions
nkeynes@545
    32
 */
nkeynes@545
    33
gboolean video_glx_init( Display *display, int screen );
nkeynes@545
    34
nkeynes@545
    35
/**
nkeynes@545
    36
 * Return the prefered visual to be used for the GL window.
nkeynes@545
    37
 * (Not using this for the render window may cause init context
nkeynes@545
    38
 * to fail).
nkeynes@545
    39
 */
nkeynes@545
    40
XVisualInfo *video_glx_get_visual();
nkeynes@545
    41
nkeynes@545
    42
/**
nkeynes@545
    43
 * Initialize the GLX context and bind to the specified window.
nkeynes@545
    44
 * (which should have been created with the visual returned above).
nkeynes@545
    45
 */
nkeynes@545
    46
gboolean video_glx_init_context( Display *display, Window window );
nkeynes@545
    47
nkeynes@545
    48
/**
nkeynes@545
    49
 * Initialize the display driver by setting the appropriate methods
nkeynes@545
    50
 * for GLX support
nkeynes@545
    51
 */
nkeynes@545
    52
gboolean video_glx_init_driver( display_driver_t driver );
nkeynes@545
    53
nkeynes@545
    54
/**
nkeynes@545
    55
 * Shutdown GLX support and release all resources.
nkeynes@545
    56
 */
nkeynes@545
    57
void video_glx_shutdown();
nkeynes@545
    58
nkeynes@736
    59
#ifdef __cplusplus
nkeynes@736
    60
}
nkeynes@545
    61
#endif
nkeynes@736
    62
nkeynes@736
    63
#endif
.