Search
lxdream.org :: lxdream/src/drivers/video_gl.h :: diff
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
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/drivers/video_gl.h Thu Feb 14 13:54:11 2008 +0000
1.3 @@ -0,0 +1,57 @@
1.4 +/**
1.5 + * $Id$
1.6 + *
1.7 + * Parent for all X11 display drivers.
1.8 + *
1.9 + * Copyright (c) 2005 Nathan Keynes.
1.10 + *
1.11 + * This program is free software; you can redistribute it and/or modify
1.12 + * it under the terms of the GNU General Public License as published by
1.13 + * the Free Software Foundation; either version 2 of the License, or
1.14 + * (at your option) any later version.
1.15 + *
1.16 + * This program is distributed in the hope that it will be useful,
1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.20 + */
1.21 +
1.22 +#ifndef video_gl_common_H
1.23 +#define video_gl_common_H
1.24 +
1.25 +/**
1.26 + * Generic GL routine to draw the given frame buffer into a texture
1.27 + */
1.28 +gboolean gl_load_frame_buffer( frame_buffer_t frame, int tex_id );
1.29 +
1.30 +/**
1.31 + * Generic GL routine to blank the display view with the specified colour.
1.32 + */
1.33 +gboolean gl_display_blank( uint32_t colour );
1.34 +
1.35 +/**
1.36 + * Write a rectangular texture (GL_TEXTURE_RECTANGLE_ARB) to the display frame
1.37 + */
1.38 +void gl_display_render_buffer( render_buffer_t buffer );
1.39 +
1.40 +/**
1.41 + * Write a rectangular texture (GL_TEXTURE_RECTANGLE_ARB) to the display frame
1.42 + */
1.43 +void gl_texture_window( int width, int height, int tex_id, gboolean inverted );
1.44 +
1.45 +/**
1.46 + * Generic GL read_render_buffer. This function assumes that the caller
1.47 + * has already set the appropriate glReadBuffer(); in other words, unless
1.48 + * there's only one buffer this needs to be wrapped.
1.49 + */
1.50 +gboolean gl_read_render_buffer( unsigned char *target, render_buffer_t buffer,
1.51 + int rowstride, int colour_format );
1.52 +
1.53 +
1.54 +/****** FBO handling (gl_fbo.c) ******/
1.55 +gboolean gl_fbo_is_supported();
1.56 +void gl_fbo_shutdown();
1.57 +void gl_fbo_init( display_driver_t driver );
1.58 +void gl_fbo_detach();
1.59 +
1.60 +#endif /* !video_gl_common_H */
.