mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 18:15:10 +00:00
Documentation work.
This commit is contained in:
parent
49ec306a0a
commit
1285e07f1b
@ -252,7 +252,7 @@ defines `_GLFW_USE_CONFIG_H`, which causes this header to be included by
|
|||||||
`internal.h`. Without this macro, GLFW will expect the necessary configuration
|
`internal.h`. Without this macro, GLFW will expect the necessary configuration
|
||||||
macros to be defined on the command-line.
|
macros to be defined on the command-line.
|
||||||
|
|
||||||
Three macros _must_ be defined when compiling GLFW: one for selecting the window
|
Three macros _must_ be defined when compiling GLFW: one selecting the window
|
||||||
creation API, one selecting the context creation API and one client library.
|
creation API, one selecting the context creation API and one client library.
|
||||||
Exactly one of each kind must be defined for GLFW to compile and link.
|
Exactly one of each kind must be defined for GLFW to compile and link.
|
||||||
|
|
||||||
|
@ -30,46 +30,36 @@ monitor it corresponds to. Doing this requires you to use the
|
|||||||
|
|
||||||
@subsubsection rift_extend_detect_win32 Detecting a Rift on Windows
|
@subsubsection rift_extend_detect_win32 Detecting a Rift on Windows
|
||||||
|
|
||||||
To identify which monitor corresponds to the Rift, compare Win32 display device
|
The native display device name of a GLFW monitor, as returned by @ref
|
||||||
names. The display device name of a GLFW monitor is returned by @ref
|
glfwGetWin32Monitor, corresponds to the display device name of the detected Rift
|
||||||
glfwGetWin32Monitor and the display device name of the detected Rift is stored
|
as stored, in the `DisplayDeviceName` member of `ovrHmdDesc`.
|
||||||
in the `DisplayDeviceName` member of `ovrHmdDesc`.
|
|
||||||
|
|
||||||
@code
|
@code
|
||||||
int i, count;
|
int i, count;
|
||||||
GLFWmonitor* monitor = NULL;
|
|
||||||
GLFWmonitor** monitors = glfwGetMonitors(&count);
|
GLFWmonitor** monitors = glfwGetMonitors(&count);
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
if (strcmp(glfwGetWin32Monitor(monitors[i]), hmd->DisplayDeviceName) == 0)
|
if (strcmp(glfwGetWin32Monitor(monitors[i]), hmd->DisplayDeviceName) == 0)
|
||||||
{
|
return monitors[i];
|
||||||
monitor = monitors[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
|
||||||
@subsubsection rift_extend_detect_osx Detecting a Rift on OS X
|
@subsubsection rift_extend_detect_osx Detecting a Rift on OS X
|
||||||
|
|
||||||
To identify which monitor corresponds to the Rift, compare OS X display IDs.
|
The native display ID of a GLFW monitor, as returned by @ref
|
||||||
The display ID of a GLFW monitor is returned by @ref glfwGetCocoaMonitor and the
|
glfwGetCocoaMonitor, corresponds to the display ID of the detected Rift, as
|
||||||
display ID of the detected Rift is stored in the `DisplayId` member of
|
stored in the `DisplayId` member of `ovrHmdDesc`.
|
||||||
`ovrHmdDesc`.
|
|
||||||
|
|
||||||
@code
|
@code
|
||||||
int i, count;
|
int i, count;
|
||||||
GLFWmonitor* monitor = NULL;
|
|
||||||
GLFWmonitor** monitors = glfwGetMonitors(&count);
|
GLFWmonitor** monitors = glfwGetMonitors(&count);
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
if (glfwGetCocoaMonitor(monitors[i]) == hmd->DisplayId)
|
if (glfwGetCocoaMonitor(monitors[i]) == hmd->DisplayId)
|
||||||
{
|
return monitors[i];
|
||||||
monitor = monitors[i];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
|
@ -75,6 +75,9 @@ Once you have a full screen window, you can change its resolution with @ref
|
|||||||
glfwSetWindowSize. The new video mode will be selected and set the same way as
|
glfwSetWindowSize. The new video mode will be selected and set the same way as
|
||||||
the video mode chosen by @ref glfwCreateWindow.
|
the video mode chosen by @ref glfwCreateWindow.
|
||||||
|
|
||||||
|
|
||||||
|
@subsubsection window_windowed_full_screen "Windowed full screen" windows
|
||||||
|
|
||||||
By default, the original video mode of the monitor will be restored and the
|
By default, the original video mode of the monitor will be restored and the
|
||||||
window iconified if it loses input focus, to allow the user to switch back to
|
window iconified if it loses input focus, to allow the user to switch back to
|
||||||
the desktop. This behavior can be disabled with the `GLFW_AUTO_ICONIFY` window
|
the desktop. This behavior can be disabled with the `GLFW_AUTO_ICONIFY` window
|
||||||
|
Loading…
Reference in New Issue
Block a user