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:
Camilla Löwy
2017-02-14 15:43:31 +01:00
parent 071a049f07
commit 6d9a58bfef
15 changed files with 154 additions and 77 deletions
+14
View File
@@ -59,6 +59,7 @@
typedef int GLFWbool;
typedef struct _GLFWinitconfig _GLFWinitconfig;
typedef struct _GLFWwndconfig _GLFWwndconfig;
typedef struct _GLFWctxconfig _GLFWctxconfig;
typedef struct _GLFWfbconfig _GLFWfbconfig;
@@ -259,6 +260,18 @@ typedef void (APIENTRY * PFN_vkVoidFunction)(void);
// Platform-independent structures
//========================================================================
/*! @brief Initialization configuration.
*
* Parameters relating to the initialization of the library.
*/
struct _GLFWinitconfig
{
struct {
GLFWbool menubar;
GLFWbool chdir;
} ns;
};
/*! @brief Window configuration.
*
* Parameters relating to the creation of the window but not directly related
@@ -476,6 +489,7 @@ struct _GLFWlibrary
GLFWbool initialized;
struct {
_GLFWinitconfig init;
_GLFWfbconfig framebuffer;
_GLFWwndconfig window;
_GLFWctxconfig context;