1.1 --- a/src/display.h Mon Jul 28 03:41:25 2008 +0000
1.2 +++ b/src/display.h Wed Aug 27 10:59:10 2008 +0000
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.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.12 @@ -138,9 +140,12 @@
1.13 gchar *(*get_keysym_for_keycode)( uint16_t keycode );
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.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.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.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.34 + void (*finish_render)( render_buffer_t buffer );
1.37 * Load the supplied frame buffer into the given render buffer.
1.38 * Included here to allow driver-specific optimizations.