Search
lxdream.org :: lxdream/src/drivers/video_gl.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_gl.h
changeset 635:76c63aac3590
next662:7c8b88493ee1
author nkeynes
date Thu Feb 14 13:54:11 2008 +0000 (13 years ago)
branchlxdream-render
permissions -rw-r--r--
last change Commit render work in progress. Main changes:
* Preliminary OSMesa support
* Move the generic gl code out to pvr2/
* Implement scene data structure + reader
* Remove the 1/z adjustments
file annotate diff log raw
nkeynes@635
     1
/**
nkeynes@635
     2
 * $Id$
nkeynes@635
     3
 *
nkeynes@635
     4
 * Parent for all X11 display drivers.
nkeynes@635
     5
 *
nkeynes@635
     6
 * Copyright (c) 2005 Nathan Keynes.
nkeynes@635
     7
 *
nkeynes@635
     8
 * This program is free software; you can redistribute it and/or modify
nkeynes@635
     9
 * it under the terms of the GNU General Public License as published by
nkeynes@635
    10
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@635
    11
 * (at your option) any later version.
nkeynes@635
    12
 *
nkeynes@635
    13
 * This program is distributed in the hope that it will be useful,
nkeynes@635
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@635
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@635
    16
 * GNU General Public License for more details.
nkeynes@635
    17
 */
nkeynes@635
    18
nkeynes@635
    19
#ifndef video_gl_common_H
nkeynes@635
    20
#define video_gl_common_H
nkeynes@635
    21
nkeynes@635
    22
/**
nkeynes@635
    23
 * Generic GL routine to draw the given frame buffer into a texture
nkeynes@635
    24
 */
nkeynes@635
    25
gboolean gl_load_frame_buffer( frame_buffer_t frame, int tex_id );
nkeynes@635
    26
nkeynes@635
    27
/**
nkeynes@635
    28
 * Generic GL routine to blank the display view with the specified colour.
nkeynes@635
    29
 */
nkeynes@635
    30
gboolean gl_display_blank( uint32_t colour );
nkeynes@635
    31
nkeynes@635
    32
/**
nkeynes@635
    33
 * Write a rectangular texture (GL_TEXTURE_RECTANGLE_ARB) to the display frame
nkeynes@635
    34
 */
nkeynes@635
    35
void gl_display_render_buffer( render_buffer_t buffer );
nkeynes@635
    36
nkeynes@635
    37
/**
nkeynes@635
    38
 * Write a rectangular texture (GL_TEXTURE_RECTANGLE_ARB) to the display frame
nkeynes@635
    39
 */
nkeynes@635
    40
void gl_texture_window( int width, int height, int tex_id, gboolean inverted );
nkeynes@635
    41
nkeynes@635
    42
/**
nkeynes@635
    43
 * Generic GL read_render_buffer. This function assumes that the caller
nkeynes@635
    44
 * has already set the appropriate glReadBuffer(); in other words, unless
nkeynes@635
    45
 * there's only one buffer this needs to be wrapped.
nkeynes@635
    46
 */
nkeynes@635
    47
gboolean gl_read_render_buffer( unsigned char *target, render_buffer_t buffer, 
nkeynes@635
    48
				int rowstride, int colour_format );
nkeynes@635
    49
nkeynes@635
    50
nkeynes@635
    51
/****** FBO handling (gl_fbo.c) ******/
nkeynes@635
    52
gboolean gl_fbo_is_supported();
nkeynes@635
    53
void gl_fbo_shutdown();
nkeynes@635
    54
void gl_fbo_init( display_driver_t driver );
nkeynes@635
    55
void gl_fbo_detach();
nkeynes@635
    56
nkeynes@635
    57
#endif /* !video_gl_common_H */
.