cogl_texture_new_from_foreign: improve docs

Improve the explanation of what the x_pot_waste and y_pot_waste
arguments can be used for.
This commit is contained in:
Robert Bragg 2010-02-16 14:53:10 +00:00
parent 9c06c94374
commit 5de743de70

View File

@ -132,13 +132,20 @@ cogl_texture_new_from_data (unsigned int width,
* @gl_target: opengl target type of foreign texture * @gl_target: opengl target type of foreign texture
* @width: width of foreign texture * @width: width of foreign texture
* @height: height of foreign texture. * @height: height of foreign texture.
* @x_pot_waste: maximum horizontal waste. * @x_pot_waste: horizontal waste on the right hand edge of the texture.
* @y_pot_waste: maximum vertical waste. * @y_pot_waste: vertical waste on the bottom edge of the texture.
* @format: format of the foreign texture. * @format: format of the foreign texture.
* *
* Creates a COGL texture based on an existing OpenGL texture; the * Creates a COGL texture based on an existing OpenGL texture; the
* width, height and format are passed along since it is not possible * width, height and format are passed along since it is not always
* to query this from a handle with GLES 1.0. * possible to query these from OpenGL.
*
* The waste arguments allow you to create a Cogl texture that maps to
* a region smaller than the real OpenGL texture. For instance if your
* hardware only supports power-of-two textures you may load a
* non-power-of-two image into a larger power-of-two texture and use
* the waste arguments to tell Cogl which region should be mapped to
* the texture coordinate range [0:1].
* *
* Return value: a #CoglHandle to the newly created texture or * Return value: a #CoglHandle to the newly created texture or
* %COGL_INVALID_HANDLE on failure * %COGL_INVALID_HANDLE on failure