1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Add missing pixel format documentation

Fixes #1027.
This commit is contained in:
Camilla Löwy 2017-06-06 18:17:58 +02:00
parent c48127fa9e
commit beaeb0d4af
3 changed files with 15 additions and 4 deletions

View File

@ -346,8 +346,8 @@ If cursor creation fails, `NULL` will be returned, so it is necessary to check
the return value. the return value.
The image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits The image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits
per channel. The pixels are arranged canonically as sequential rows, starting per channel with the red channel first. The pixels are arranged canonically as
from the top-left corner. sequential rows, starting from the top-left corner.
@subsubsection cursor_standard Standard cursor creation @subsubsection cursor_standard Standard cursor creation

View File

@ -785,6 +785,10 @@ images[1] = load_icon("my_icon_small.png");
glfwSetWindowIcon(window, 2, images); glfwSetWindowIcon(window, 2, images);
@endcode @endcode
The image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits
per channel with the red channel first. The pixels are arranged canonically as
sequential rows, starting from the top-left corner.
To revert to the default window icon, pass in an empty image array. To revert to the default window icon, pass in an empty image array.
@code @code

View File

@ -1458,6 +1458,9 @@ typedef struct GLFWgammaramp
} GLFWgammaramp; } GLFWgammaramp;
/*! @brief Image data. /*! @brief Image data.
*
* This describes a single 2D image. See the documentation for each related
* function what the expected pixel format is.
* *
* @sa @ref cursor_custom * @sa @ref cursor_custom
* @sa @ref window_icon * @sa @ref window_icon
@ -2323,6 +2326,10 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* window, const char* title);
* selected. If no images are specified, the window reverts to its default * selected. If no images are specified, the window reverts to its default
* icon. * icon.
* *
* The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight
* bits per channel with the red channel first. They are arranged canonically
* as packed sequential rows, starting from the top-left corner.
*
* The desired image sizes varies depending on platform and system settings. * The desired image sizes varies depending on platform and system settings.
* The selected images will be rescaled as needed. Good sizes include 16x16, * The selected images will be rescaled as needed. Good sizes include 16x16,
* 32x32 and 48x48. * 32x32 and 48x48.
@ -3726,8 +3733,8 @@ GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);
* Any remaining cursors are destroyed by @ref glfwTerminate. * Any remaining cursors are destroyed by @ref glfwTerminate.
* *
* The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight * The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight
* bits per channel. They are arranged canonically as packed sequential rows, * bits per channel with the red channel first. They are arranged canonically
* starting from the top-left corner. * as packed sequential rows, starting from the top-left corner.
* *
* The cursor hotspot is specified in pixels, relative to the upper-left corner * The cursor hotspot is specified in pixels, relative to the upper-left corner
* of the cursor image. Like all other coordinate systems in GLFW, the X-axis * of the cursor image. Like all other coordinate systems in GLFW, the X-axis