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 669:ab344e42bca9
prev662:7c8b88493ee1
next736:a02d1475ccfd
author nkeynes
date Mon May 12 10:00:13 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Cleanup most of the -Wall warnings (getting a bit sloppy...)
Convert FP code to use fixed banks rather than indirect pointer
(3-4% faster this way now)
view annotate diff log raw
     1 /**
     2  * $Id$
     3  *
     4  * Common GL code that doesn't depend on a specific implementation
     5  *
     6  * Copyright (c) 2005 Nathan Keynes.
     7  *
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  */
    19 #ifndef video_gl_common_H
    20 #define video_gl_common_H
    22 /**
    23  * Generic GL routine to draw the given frame buffer into a texture
    24  */
    25 gboolean gl_load_frame_buffer( frame_buffer_t frame, int tex_id );
    27 /**
    28  * Reset the GL state to its initial values
    29  */
    30 void gl_reset_state();
    32 /**
    33  * Generic GL routine to blank the display view with the specified colour.
    34  */
    35 void gl_display_blank( uint32_t colour );
    37 /**
    38  * Write a rectangular texture (GL_TEXTURE_RECTANGLE_ARB) to the display frame
    39  */
    40 void gl_display_render_buffer( render_buffer_t buffer );
    42 /**
    43  * Write a rectangular texture (GL_TEXTURE_RECTANGLE_ARB) to the display frame
    44  */
    45 void gl_texture_window( int width, int height, int tex_id, gboolean inverted );
    47 /**
    48  * Generic GL read_render_buffer. This function assumes that the caller
    49  * has already set the appropriate glReadBuffer(); in other words, unless
    50  * there's only one buffer this needs to be wrapped.
    51  */
    52 gboolean gl_read_render_buffer( unsigned char *target, render_buffer_t buffer, 
    53 				int rowstride, int colour_format );
    56 /****** FBO handling (gl_fbo.c) ******/
    57 gboolean gl_fbo_is_supported();
    58 void gl_fbo_shutdown();
    59 void gl_fbo_init( display_driver_t driver );
    60 void gl_fbo_detach();
    62 #endif /* !video_gl_common_H */
.