Search
lxdream.org :: lxdream/src/display.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/display.h
changeset 805:b355f7b3ff2e
prev770:429ff505c450
next839:51f1c4195790
author nkeynes
date Thu Aug 07 23:53:17 2008 +0000 (14 years ago)
permissions -rw-r--r--
last change Add ability to bind a render buffer to a texture, with output going to the texture.
(RTT work in progress)
file annotate diff log raw
1.1 --- a/src/display.h Mon Jul 28 03:41:25 2008 +0000
1.2 +++ b/src/display.h Thu Aug 07 23:53:17 2008 +0000
1.3 @@ -74,6 +74,8 @@
1.4 uint32_t size; /* Size of buffer in bytes, must be width*height*bpp */
1.5 gboolean inverted;/* True if the buffer is upside down */
1.6 uint32_t scale;
1.7 + GLuint tex_id; /* texture bound to render buffer, if any (0 = none).
1.8 + * The render buffer does not own the texture */
1.9 unsigned int buf_id; /* driver-specific buffer id, if applicable */
1.10 gboolean flushed; /* True if the buffer has been flushed to vram */
1.11 };
1.12 @@ -138,9 +140,12 @@
1.13 gchar *(*get_keysym_for_keycode)( uint16_t keycode );
1.14
1.15 /**
1.16 - * Create a render target with the given width and height.
1.17 + * Create a render target with the given width and height. If a texture ID
1.18 + * is supplied (non-zero), the render buffer writes its output to that texture.
1.19 + * @param tex_id 0 or a valid GL texture name which must have been initialized to
1.20 + * the correct dimensions.
1.21 */
1.22 - render_buffer_t (*create_render_buffer)( uint32_t width, uint32_t height );
1.23 + render_buffer_t (*create_render_buffer)( uint32_t width, uint32_t height, GLuint tex_id );
1.24
1.25 /**
1.26 * Destroy the specified render buffer and release any associated
1.27 @@ -154,6 +159,12 @@
1.28 gboolean (*set_render_target)( render_buffer_t buffer );
1.29
1.30 /**
1.31 + * Complete rendering and clear the current rendering target. If the
1.32 + * buffer has a bound texture, it will be updated if necessary.
1.33 + */
1.34 + void (*finish_render)( render_buffer_t buffer );
1.35 +
1.36 + /**
1.37 * Load the supplied frame buffer into the given render buffer.
1.38 * Included here to allow driver-specific optimizations.
1.39 */
.