Search
lxdream.org :: lxdream/src/drivers/gl_common.h :: diff
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
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/drivers/gl_common.h Sun Feb 11 10:09:32 2007 +0000
1.3 @@ -0,0 +1,57 @@
1.4 +/**
1.5 + * $Id: gl_common.h,v 1.1 2007-02-11 10:09:32 nkeynes Exp $
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 +#include "display.h"
1.26 +
1.27 +/**
1.28 + * Test if a specific extension is supported. From opengl.org
1.29 + * @param extension extension name to check for
1.30 + * @return TRUE if supported, otherwise FALSE.
1.31 + */
1.32 +gboolean isGLExtensionSupported( const char *extension );
1.33 +
1.34 +gboolean hasRequiredGLExtensions();
1.35 +
1.36 +/**
1.37 + * Generic GL routine to draw the given frame buffer in the display view.
1.38 + */
1.39 +gboolean gl_display_frame_buffer( frame_buffer_t frame );
1.40 +
1.41 +/**
1.42 + * Generic GL routine to blank the display view with the specified colour.
1.43 + */
1.44 +gboolean gl_display_blank( uint32_t colour );
1.45 +
1.46 +
1.47 +/**
1.48 + * Generic GL read_render_buffer. This function assumes that the caller
1.49 + * has already set the appropriate glReadBuffer(); in other words, unless
1.50 + * there's only one buffer this needs to be wrapped.
1.51 + */
1.52 +gboolean gl_read_render_buffer( render_buffer_t buffer, char *target );
1.53 +
1.54 +
1.55 +/****** FBO handling (gl_fbo.c) ******/
1.56 +gboolean gl_fbo_is_supported();
1.57 +void gl_fbo_shutdown();
1.58 +void gl_fbo_init( display_driver_t driver );
1.59 +
1.60 +#endif /* !video_gl_common_H */
.