From 8fe33a340b8979a73fa84f201c15519a9b5d0266 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 14 Nov 2010 21:20:43 -0500 Subject: Document libdimension with Doxygen. --- libdimension/dimension/gl.h | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'libdimension/dimension/gl.h') diff --git a/libdimension/dimension/gl.h b/libdimension/dimension/gl.h index 3eb292c..25979c4 100644 --- a/libdimension/dimension/gl.h +++ b/libdimension/dimension/gl.h @@ -18,21 +18,36 @@ * . * *************************************************************************/ -/* - * Draw a canvas to a GL framebuffer with glDrawPixels, or read one with - * glReadPixels. Should be fast, so no _async() versions. +/** + * @file + * OpenGL export/import of canvases. */ #ifndef DIMENSION_GL_H #define DIMENSION_GL_H -/* Optimize canvas for GL drawing */ +/** + * Optimize a canvas for GL drawing + * @param[in,out] canvas The canvas to optimize. + * @return Whether the canvas was successfully optimized. + */ int dmnsn_gl_optimize_canvas(dmnsn_canvas *canvas); -/* Write canvas to GL framebuffer. Returns 0 on success, nonzero on failure. */ +/** + * Write canvas to GL framebuffer. + * @param[in] canvas The canvas to write. + * @return 0 on success, non-zero on failure. + */ int dmnsn_gl_write_canvas(const dmnsn_canvas *canvas); -/* Read a canvas from a GL framebuffer. Returns NULL on failure. */ +/** + * Read a canvas from a GL framebuffer. + * @param[in] x0 The \a x screen coordinate to start copying from. + * @param[in] y0 The \a y screen coordinate to start copying from. + * @param[in] width The width of the read area. + * @param[in] height The height of the read area. + * @return The allocated canvas, or NULL on failure. + */ dmnsn_canvas *dmnsn_gl_read_canvas(size_t x0, size_t y0, size_t width, size_t height); -- cgit v1.2.3