mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Documentation work.
This commit is contained in:
parent
2085876da6
commit
138feb8be6
|
@ -228,7 +228,7 @@ if DWM is enabled. It is recommended to set this to `OFF`, as doing otherwise
|
||||||
can lead to severe jitter.
|
can lead to severe jitter.
|
||||||
|
|
||||||
`GLFW_USE_OPTIMUS_HPG` determines whether to export the `NvOptimusEnablement`
|
`GLFW_USE_OPTIMUS_HPG` determines whether to export the `NvOptimusEnablement`
|
||||||
symbol, which forces the use of the high-performance GPU on nVidia Optimus
|
symbol, which forces the use of the high-performance GPU on Nvidia Optimus
|
||||||
systems. This symbol needs to be exported by the EXE, so the override will not
|
systems. This symbol needs to be exported by the EXE, so the override will not
|
||||||
work if GLFW is built as a DLL.
|
work if GLFW is built as a DLL.
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ OpenGL or OpenGL ES API. One such library is
|
||||||
take care of all the details of declaring and loading everything you need.
|
take care of all the details of declaring and loading everything you need.
|
||||||
|
|
||||||
The following example will use glad, but other extension loader libraries work
|
The following example will use glad, but other extension loader libraries work
|
||||||
similary.
|
similarly.
|
||||||
|
|
||||||
First you need to generate the source files using the glad Python script. This
|
First you need to generate the source files using the glad Python script. This
|
||||||
example generates a loader for any version of OpenGL, which is the default for
|
example generates a loader for any version of OpenGL, which is the default for
|
||||||
|
@ -263,7 +263,7 @@ it returns zero.
|
||||||
Many extensions, though not all, require the use of new OpenGL functions.
|
Many extensions, though not all, require the use of new OpenGL functions.
|
||||||
These functions often do not have entry points in the client API libraries of
|
These functions often do not have entry points in the client API libraries of
|
||||||
your operating system, making it necessary to fetch them at run time. You can
|
your operating system, making it necessary to fetch them at run time. You can
|
||||||
retreive pointers to these functions with @ref glfwGetProcAddress.
|
retrieve pointers to these functions with @ref glfwGetProcAddress.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
PFNGLGETDEBUGMESSAGELOGARB pfnGetDebugMessageLog = glfwGetProcAddress("glGetDebugMessageLogARB");
|
PFNGLGETDEBUGMESSAGELOGARB pfnGetDebugMessageLog = glfwGetProcAddress("glGetDebugMessageLogARB");
|
||||||
|
|
|
@ -300,7 +300,7 @@ 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 RGBA, i.e. eight bits per channel. The pixels are
|
The image data is 32-bit RGBA, i.e. eight bits per channel. The pixels are
|
||||||
arranged canonically as sequental rows, starting from the top-left corner.
|
arranged canonically as sequential rows, starting from the top-left corner.
|
||||||
|
|
||||||
|
|
||||||
@subsubsection input_cursor_destruction Cursor destruction
|
@subsubsection input_cursor_destruction Cursor destruction
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
@page news New features
|
@page news New features
|
||||||
|
|
||||||
@tableofcontents
|
|
||||||
|
|
||||||
|
|
||||||
@section news_31 New features in version 3.1
|
@section news_31 New features in version 3.1
|
||||||
|
|
||||||
@subsection news_31_cursor Custom mouse cursor images
|
@subsection news_31_cursor Custom mouse cursor images
|
||||||
|
@ -153,7 +150,7 @@ glfwSetGamma, which generates a ramp from a gamma value and then sets it.
|
||||||
GLFW now supports the creation of OpenGL ES contexts, by setting the
|
GLFW now supports the creation of OpenGL ES contexts, by setting the
|
||||||
`GLFW_CLIENT_API` window hint to `GLFW_OPENGL_ES_API`, where creation of such
|
`GLFW_CLIENT_API` window hint to `GLFW_OPENGL_ES_API`, where creation of such
|
||||||
contexts are supported. Note that GLFW _does not implement_ OpenGL ES, so your
|
contexts are supported. Note that GLFW _does not implement_ OpenGL ES, so your
|
||||||
driver must provide support in a way usable by GLFW. Modern nVidia and Intel
|
driver must provide support in a way usable by GLFW. Modern Nvidia and Intel
|
||||||
drivers support creation of OpenGL ES context using the GLX and WGL APIs, while
|
drivers support creation of OpenGL ES context using the GLX and WGL APIs, while
|
||||||
AMD provides an EGL implementation instead.
|
AMD provides an EGL implementation instead.
|
||||||
|
|
||||||
|
|
|
@ -248,13 +248,13 @@ __OpenGL ES:__ `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR` are
|
||||||
constraints, but creation will fail if the OpenGL ES version of the created
|
constraints, but creation will fail if the OpenGL ES version of the created
|
||||||
context is less than the one requested. Additionally, OpenGL ES 1.x cannot be
|
context is less than the one requested. Additionally, OpenGL ES 1.x cannot be
|
||||||
returned if 2.0 or later was requested, and vice versa. This is because OpenGL
|
returned if 2.0 or later was requested, and vice versa. This is because OpenGL
|
||||||
ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backard
|
ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward
|
||||||
compatible with 1.x.
|
compatible with 1.x.
|
||||||
|
|
||||||
`GLFW_OPENGL_FORWARD_COMPAT` specifies whether the OpenGL context should be
|
`GLFW_OPENGL_FORWARD_COMPAT` specifies whether the OpenGL context should be
|
||||||
forward-compatible, i.e. one where all functionality deprecated in the requested
|
forward-compatible, i.e. one where all functionality deprecated in the requested
|
||||||
version of OpenGL is removed. This may only be used if the requested OpenGL
|
version of OpenGL is removed. This may only be used if the requested OpenGL
|
||||||
version is 3.0 or above. If OpenGL S is requested, this hint is ignored.
|
version is 3.0 or above. If OpenGL ES is requested, this hint is ignored.
|
||||||
|
|
||||||
@par
|
@par
|
||||||
Forward-compatibility is described in detail in the
|
Forward-compatibility is described in detail in the
|
||||||
|
@ -492,7 +492,7 @@ a high-DPI one.
|
||||||
The position of a windowed-mode window can be changed with @ref
|
The position of a windowed-mode window can be changed with @ref
|
||||||
glfwSetWindowPos. This moves the window so that the upper-left corner of its
|
glfwSetWindowPos. This moves the window so that the upper-left corner of its
|
||||||
client area has the specified [screen coordinates](@ref coordinate_systems).
|
client area has the specified [screen coordinates](@ref coordinate_systems).
|
||||||
The window system may put limitats on window placement.
|
The window system may put limitations on window placement.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
glfwSetWindowPos(window, 100, 100);
|
glfwSetWindowPos(window, 100, 100);
|
||||||
|
@ -602,7 +602,7 @@ void window_iconify_callback(GLFWwindow* window, int iconified)
|
||||||
}
|
}
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
You can also get the iconification state with @ref glfwGetWindowAttrib.
|
You can also get the current iconification state with @ref glfwGetWindowAttrib.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
int iconified = glfwGetWindowAttrib(window, GLFW_ICONIFIED);
|
int iconified = glfwGetWindowAttrib(window, GLFW_ICONIFIED);
|
||||||
|
@ -633,7 +633,7 @@ invisible to the user until shown. This can be useful if you need to set up
|
||||||
your window further before showing it, for example moving it to a specific
|
your window further before showing it, for example moving it to a specific
|
||||||
location.
|
location.
|
||||||
|
|
||||||
You can also get the visibility state with @ref glfwGetWindowAttrib.
|
You can also get the current visibility state with @ref glfwGetWindowAttrib.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
int visible = glfwGetWindowAttrib(window, GLFW_VISIBLE);
|
int visible = glfwGetWindowAttrib(window, GLFW_VISIBLE);
|
||||||
|
@ -665,7 +665,7 @@ void window_focus_callback(GLFWwindow* window, int focused)
|
||||||
}
|
}
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
You can also get the focus state with @ref glfwGetWindowAttrib.
|
You can also get the current focus state with @ref glfwGetWindowAttrib.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
int focused = glfwGetWindowAttrib(window, GLFW_FOCUSED);
|
int focused = glfwGetWindowAttrib(window, GLFW_FOCUSED);
|
||||||
|
|
|
@ -557,9 +557,9 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* @par
|
* @par
|
||||||
* Some pre-installed Windows graphics drivers do not support OpenGL. AMD only
|
* Some pre-installed Windows graphics drivers do not support OpenGL. AMD only
|
||||||
* supports OpenGL ES via EGL, while nVidia and Intel only supports it via
|
* supports OpenGL ES via EGL, while Nvidia and Intel only supports it via
|
||||||
* a WGL or GLX extension. OS X does not provide OpenGL ES at all. The Mesa
|
* a WGL or GLX extension. OS X does not provide OpenGL ES at all. The Mesa
|
||||||
* EGL, OpenGL and OpenGL ES libraries do not interface with the nVidia binary
|
* EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary
|
||||||
* driver.
|
* driver.
|
||||||
*/
|
*/
|
||||||
#define GLFW_API_UNAVAILABLE 0x00010006
|
#define GLFW_API_UNAVAILABLE 0x00010006
|
||||||
|
@ -2672,7 +2672,7 @@ GLFWAPI void glfwSetCursorPos(GLFWwindow* window, double xpos, double ypos);
|
||||||
* glfwTerminate.
|
* glfwTerminate.
|
||||||
*
|
*
|
||||||
* The image data is 32-bit RGBA, i.e. eight bits per channel. The pixels are
|
* The image data is 32-bit RGBA, i.e. eight bits per channel. The pixels are
|
||||||
* arranged canonically as sequental rows, starting from the top-left corner.
|
* arranged canonically as sequential rows, starting from the top-left corner.
|
||||||
*
|
*
|
||||||
* @param[in] image The desired cursor image.
|
* @param[in] image The desired cursor image.
|
||||||
* @param[in] xhot The desired x-coordinate of the cursor hotspot.
|
* @param[in] xhot The desired x-coordinate of the cursor hotspot.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user