Search
lxdream.org :: lxdream/src/drivers/gl_common.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/gl_common.h
changeset 352:f0df7a6d4703
next405:570d93abb5b7
author nkeynes
date Sun Feb 11 10:09:32 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Bug 27: Implement opengl framebuffer objects
Rewrite much of the final video output stage. Now uses generic "render
buffers", implemented on GL using framebuffer objects + textures.
file annotate diff log raw
nkeynes@352
     1
/**
nkeynes@352
     2
 * $Id: gl_common.h,v 1.1 2007-02-11 10:09:32 nkeynes Exp $
nkeynes@352
     3
 *
nkeynes@352
     4
 * Parent for all X11 display drivers.
nkeynes@352
     5
 *
nkeynes@352
     6
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@352
     7
 *
nkeynes@352
     8
 * This program is free software; you can redistribute it and/or modify
nkeynes@352
     9
 * it under the terms of the GNU General Public License as published by
nkeynes@352
    10
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@352
    11
 * (at your option) any later version.
nkeynes@352
    12
 *
nkeynes@352
    13
 * This program is distributed in the hope that it will be useful,
nkeynes@352
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@352
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@352
    16
 * GNU General Public License for more details.
nkeynes@352
    17
 */
nkeynes@352
    18
nkeynes@352
    19
#ifndef video_gl_common_H
nkeynes@352
    20
#define video_gl_common_H
nkeynes@352
    21
nkeynes@352
    22
#include "display.h"
nkeynes@352
    23
nkeynes@352
    24
/**
nkeynes@352
    25
 * Test if a specific extension is supported. From opengl.org
nkeynes@352
    26
 * @param extension extension name to check for
nkeynes@352
    27
 * @return TRUE if supported, otherwise FALSE.
nkeynes@352
    28
 */
nkeynes@352
    29
gboolean isGLExtensionSupported( const char *extension );
nkeynes@352
    30
nkeynes@352
    31
gboolean hasRequiredGLExtensions();
nkeynes@352
    32
nkeynes@352
    33
/**
nkeynes@352
    34
 * Generic GL routine to draw the given frame buffer in the display view.
nkeynes@352
    35
 */
nkeynes@352
    36
gboolean gl_display_frame_buffer( frame_buffer_t frame );
nkeynes@352
    37
nkeynes@352
    38
/**
nkeynes@352
    39
 * Generic GL routine to blank the display view with the specified colour.
nkeynes@352
    40
 */
nkeynes@352
    41
gboolean gl_display_blank( uint32_t colour );
nkeynes@352
    42
nkeynes@352
    43
nkeynes@352
    44
/**
nkeynes@352
    45
 * Generic GL read_render_buffer. This function assumes that the caller
nkeynes@352
    46
 * has already set the appropriate glReadBuffer(); in other words, unless
nkeynes@352
    47
 * there's only one buffer this needs to be wrapped.
nkeynes@352
    48
 */
nkeynes@352
    49
gboolean gl_read_render_buffer( render_buffer_t buffer, char *target );
nkeynes@352
    50
nkeynes@352
    51
nkeynes@352
    52
/****** FBO handling (gl_fbo.c) ******/
nkeynes@352
    53
gboolean gl_fbo_is_supported();
nkeynes@352
    54
void gl_fbo_shutdown();
nkeynes@352
    55
void gl_fbo_init( display_driver_t driver );
nkeynes@352
    56
nkeynes@352
    57
#endif /* !video_gl_common_H */
.