mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 12:18:51 -05: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
|
||||
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.
|
||||
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
|
||||
|
||||
To identify which monitor corresponds to the Rift, compare Win32 display device
|
||||
names. The display device name of a GLFW monitor is returned by @ref
|
||||
glfwGetWin32Monitor and the display device name of the detected Rift is stored
|
||||
in the `DisplayDeviceName` member of `ovrHmdDesc`.
|
||||
The native display device name of a GLFW monitor, as returned by @ref
|
||||
glfwGetWin32Monitor, corresponds to the display device name of the detected Rift
|
||||
as stored, in the `DisplayDeviceName` member of `ovrHmdDesc`.
|
||||
|
||||
@code
|
||||
int i, count;
|
||||
GLFWmonitor* monitor = NULL;
|
||||
GLFWmonitor** monitors = glfwGetMonitors(&count);
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if (strcmp(glfwGetWin32Monitor(monitors[i]), hmd->DisplayDeviceName) == 0)
|
||||
{
|
||||
monitor = monitors[i];
|
||||
break;
|
||||
}
|
||||
return monitors[i];
|
||||
}
|
||||
@endcode
|
||||
|
||||
|
||||
@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 display ID of a GLFW monitor is returned by @ref glfwGetCocoaMonitor and the
|
||||
display ID of the detected Rift is stored in the `DisplayId` member of
|
||||
`ovrHmdDesc`.
|
||||
The native display ID of a GLFW monitor, as returned by @ref
|
||||
glfwGetCocoaMonitor, corresponds to the display ID of the detected Rift, as
|
||||
stored in the `DisplayId` member of `ovrHmdDesc`.
|
||||
|
||||
@code
|
||||
int i, count;
|
||||
GLFWmonitor* monitor = NULL;
|
||||
GLFWmonitor** monitors = glfwGetMonitors(&count);
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if (glfwGetCocoaMonitor(monitors[i]) == hmd->DisplayId)
|
||||
{
|
||||
monitor = monitors[i];
|
||||
break;
|
||||
}
|
||||
return monitors[i];
|
||||
}
|
||||
@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
|
||||
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
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user