mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Add glfwInitHint
This allows setting hints that control how the library is initialized, transforming more compile-time options into run-time ones.
This commit is contained in:
@@ -31,6 +31,7 @@ successfully initialized, and only from the main thread.
|
||||
- @ref glfwGetVersion
|
||||
- @ref glfwGetVersionString
|
||||
- @ref glfwSetErrorCallback
|
||||
- @ref glfwInitHint
|
||||
- @ref glfwInit
|
||||
- @ref glfwTerminate
|
||||
|
||||
@@ -61,6 +62,42 @@ allocated by programs that simply exit, but GLFW sometimes has to change global
|
||||
system settings and these might not be restored without termination.
|
||||
|
||||
|
||||
@subsection init_hints Initialization hints
|
||||
|
||||
There are a number of hints that can be set before initialization, that affect
|
||||
how the library behaves.
|
||||
|
||||
The values you set are not affected by initialization or termination, but they
|
||||
are only read during initialization. Once GLFW has been initialized, setting
|
||||
new hint values will not affect behavior until the next time it is terminated
|
||||
and initialized.
|
||||
|
||||
Some hints are platform specific. These are always valid to set on any
|
||||
platform but they will only affect their specific platform. Other platforms
|
||||
will simply ignore them. Setting these hints requires no platform specific
|
||||
headers or calls.
|
||||
|
||||
|
||||
@subsubsection init_hints_osx macOS specific hints
|
||||
|
||||
@anchor GLFW_COCOA_CHDIR_RESOURCES
|
||||
__GLFW_COCOA_CHDIR_RESOURCES__ specifies whether to set the current directory to
|
||||
the application to the `Contents/Resources` subdirectory of the application's
|
||||
bundle, if present.
|
||||
|
||||
@anchor GLFW_COCOA_MENUBAR
|
||||
__GLFW_COCOA_MENUBAR__ specifies whether to create a basic menu bar when the
|
||||
first window is created, which is when AppKit is initialized.
|
||||
|
||||
|
||||
@subsubsection init_hints_values Supported and default values
|
||||
|
||||
Init hint | Default value | Supported values
|
||||
------------------------------- | ------------- | ----------------
|
||||
@ref GLFW_COCOA_CHDIR_RESOURCES | `GLFW_TRUE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
@ref GLFW_COCOA_MENUBAR | `GLFW_TRUE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
|
||||
|
||||
@subsection intro_init_terminate Terminating GLFW
|
||||
|
||||
Before your application exits, you should terminate the GLFW library if it has
|
||||
|
||||
Reference in New Issue
Block a user