Renamed tokens used for other client APIs.

This commit is contained in:
Camilla Berglund 2012-12-13 02:22:39 +01:00
parent 37904dc68a
commit 3f5843f500
9 changed files with 86 additions and 83 deletions

View File

@ -582,8 +582,8 @@ int main(int argc, char** argv)
} }
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
glfwWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_OPENGL_VERSION_MINOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE);

View File

@ -48,6 +48,8 @@ extern "C" {
/*! @defgroup clipboard Clipboard support /*! @defgroup clipboard Clipboard support
*/ */
/*! @defgroup context Context handling
*/
/*! @defgroup error Error handling /*! @defgroup error Error handling
*/ */
/*! @defgroup gamma Gamma ramp support /*! @defgroup gamma Gamma ramp support
@ -56,15 +58,14 @@ extern "C" {
*/ */
/*! @defgroup input Input handling /*! @defgroup input Input handling
*/ */
/*! @defgroup opengl OpenGL support
*/
/*! @defgroup time Time input /*! @defgroup time Time input
*/ */
/*! @defgroup window Window handling /*! @defgroup window Window handling
* *
* The primary purpose of GLFW is to provide a simple interface to OpenGL * The primary purpose of GLFW is to provide a simple interface to window
* context creation and window management. GLFW supports multiple windows, * management and OpenGL and OpenGL ES context creation. GLFW supports
* which can be either a normal desktop window or a fullscreen window. * multiple windows, which can be either a normal desktop window or
* a fullscreen window.
*/ */
/*! @defgroup monitor Monitor handling /*! @defgroup monitor Monitor handling
*/ */
@ -173,7 +174,7 @@ extern "C" {
/* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */ /* -------------------- END SYSTEM/COMPILER SPECIFIC --------------------- */
/* Include the chosen OpenGL header and, optionally, the GLU header. /* Include the chosen client API headers.
*/ */
#if defined(__APPLE_CC__) #if defined(__APPLE_CC__)
#if defined(GLFW_INCLUDE_GLCOREARB) #if defined(GLFW_INCLUDE_GLCOREARB)
@ -476,9 +477,9 @@ extern "C" {
* otherwise. * otherwise.
*/ */
#define GLFW_CLOSE_REQUESTED 0x00020003 #define GLFW_CLOSE_REQUESTED 0x00020003
/*! @brief The OpenGL API version revision. /*! @brief The client API version revision.
*/ */
#define GLFW_OPENGL_REVISION 0x00020004 #define GLFW_CONTEXT_REVISION 0x00020004
/*! @brief The bit depth of the red component of the color buffer. /*! @brief The bit depth of the red component of the color buffer.
*/ */
@ -531,12 +532,12 @@ extern "C" {
/*! @brief The @link clients client API @endlink to create a context for. /*! @brief The @link clients client API @endlink to create a context for.
*/ */
#define GLFW_CLIENT_API 0x00022000 #define GLFW_CLIENT_API 0x00022000
#define GLFW_OPENGL_VERSION_MAJOR 0x00022001 #define GLFW_CONTEXT_VERSION_MAJOR 0x00022001
#define GLFW_OPENGL_VERSION_MINOR 0x00022002 #define GLFW_CONTEXT_VERSION_MINOR 0x00022002
#define GLFW_OPENGL_FORWARD_COMPAT 0x00022003 #define GLFW_CONTEXT_ROBUSTNESS 0x00022003
#define GLFW_OPENGL_DEBUG_CONTEXT 0x00022004 #define GLFW_OPENGL_FORWARD_COMPAT 0x00022004
#define GLFW_OPENGL_PROFILE 0x00022005 #define GLFW_OPENGL_DEBUG_CONTEXT 0x00022005
#define GLFW_OPENGL_ROBUSTNESS 0x00022006 #define GLFW_OPENGL_PROFILE 0x00022006
/*! @brief @c GL_TRUE if the window is resizable, or @c GL_FALSE otherwise. /*! @brief @c GL_TRUE if the window is resizable, or @c GL_FALSE otherwise.
*/ */
#define GLFW_RESIZABLE 0x00022007 #define GLFW_RESIZABLE 0x00022007
@ -557,45 +558,45 @@ extern "C" {
/*! @name Client APIs /*! @name Client APIs
* @{ */ * @{ */
/*! @brief The OpenGL API. /*! @brief The OpenGL API.
* @ingroup opengl * @ingroup context
*/ */
#define GLFW_OPENGL_API 0x00000001 #define GLFW_OPENGL_API 0x00000001
/*! @brief The OpenGL ES API. /*! @brief The OpenGL ES API.
* @ingroup opengl * @ingroup context
*/ */
#define GLFW_OPENGL_ES_API 0x00000002 #define GLFW_OPENGL_ES_API 0x00000002
/*! @} */ /*! @} */
/*! @name OpenGL robustness strategies /*! @name Context robustness strategies
* @{ */ * @{ */
/*! @brief No robustness strategy is used. /*! @brief No robustness strategy is used.
* *
* This is the default. * This is the default.
* @ingroup opengl * @ingroup context
*/ */
#define GLFW_OPENGL_NO_ROBUSTNESS 0x00000000 #define GLFW_NO_ROBUSTNESS 0x00000000
/*! @brief /*! @brief
* @ingroup opengl * @ingroup context
*/ */
#define GLFW_OPENGL_NO_RESET_NOTIFICATION 0x00000001 #define GLFW_NO_RESET_NOTIFICATION 0x00000001
/*! @brief /*! @brief
* @ingroup opengl * @ingroup context
*/ */
#define GLFW_OPENGL_LOSE_CONTEXT_ON_RESET 0x00000002 #define GLFW_LOSE_CONTEXT_ON_RESET 0x00000002
/*! @} */ /*! @} */
/*! @name OpenGL profiles /*! @name OpenGL profiles
* @{ */ * @{ */
/*! @brief No OpenGL profile. /*! @brief No OpenGL profile.
* @ingroup opengl * @ingroup context
*/ */
#define GLFW_OPENGL_NO_PROFILE 0x00000000 #define GLFW_OPENGL_NO_PROFILE 0x00000000
/*! @brief The OpenGL core profile. /*! @brief The OpenGL core profile.
* @ingroup opengl * @ingroup context
*/ */
#define GLFW_OPENGL_CORE_PROFILE 0x00000001 #define GLFW_OPENGL_CORE_PROFILE 0x00000001
/*! @brief The OpenGL compatibility profile. /*! @brief The OpenGL compatibility profile.
* @ingroup opengl * @ingroup context
*/ */
#define GLFW_OPENGL_COMPAT_PROFILE 0x00000002 #define GLFW_OPENGL_COMPAT_PROFILE 0x00000002
/*! @} */ /*! @} */
@ -676,7 +677,7 @@ extern "C" {
* system. * system.
*/ */
#define GLFW_API_UNAVAILABLE 0x00070006 #define GLFW_API_UNAVAILABLE 0x00070006
/*! @brief The requested OpenGL or GLES version is not available. /*! @brief The requested client API version is not available.
*/ */
#define GLFW_VERSION_UNAVAILABLE 0x00070007 #define GLFW_VERSION_UNAVAILABLE 0x00070007
/*! @brief A platform-specific error occurred that does not match any of the /*! @brief A platform-specific error occurred that does not match any of the
@ -698,8 +699,8 @@ extern "C" {
* Typedefs * Typedefs
*************************************************************************/ *************************************************************************/
/*! @brief OpenGL function pointer type. /*! @brief Client API function pointer type.
* @ingroup opengl * @ingroup context
*/ */
typedef void (*GLFWglproc)(void); typedef void (*GLFWglproc)(void);
@ -991,8 +992,8 @@ GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp);
* *
* The @ref GLFW_CLIENT_API hint is set to @ref GLFW_OPENGL_API. * The @ref GLFW_CLIENT_API hint is set to @ref GLFW_OPENGL_API.
* *
* The @ref GLFW_OPENGL_VERSION_MAJOR and @ref GLFW_OPENGL_VERSION_MINOR hints * The @ref GLFW_CONTEXT_VERSION_MAJOR and @ref GLFW_CONTEXT_VERSION_MINOR
* are set to 1 and 0, respectively. * hints are set to 1 and 0, respectively.
* *
* All other hints are set to 0. * All other hints are set to 0.
* *
@ -1036,15 +1037,18 @@ GLFWAPI void glfwDefaultWindowHints(void);
* context for. Possible values are @ref GLFW_OPENGL_API and @ref * context for. Possible values are @ref GLFW_OPENGL_API and @ref
* GLFW_OPENGL_ES_API. * GLFW_OPENGL_ES_API.
* *
* The @ref GLFW_OPENGL_VERSION_MAJOR and @ref GLFW_OPENGL_VERSION_MINOR hints * The @ref GLFW_CONTEXT_VERSION_MAJOR and @ref GLFW_CONTEXT_VERSION_MINOR
* specify the OpenGL version that the created context must be compatible with. * hints specify the client API version that the created context must be
* compatible with.
* *
* These hints are @em not hard constraints, as they don't have to match * For OpenGL, these hints are @em not hard constraints, as they don't have to
* exactly, but @ref glfwCreateWindow will still fail if the resulting OpenGL * match exactly, but @ref glfwCreateWindow will still fail if the resulting
* version is less than the one requested with hints. It is therefore * OpenGL version is less than the one requested. It is therefore perfectly
* perfectly safe to use the default of version 1.0 for legacy code and you * safe to use the default of version 1.0 for legacy code and you will still
* will still get backwards-compatible contexts of version 3.0 and above when * get backwards-compatible contexts of version 3.0 and above when available.
* available. *
* For OpenGL ES, these hints are hard constraints, as there is no backward
* compatibility between OpenGL ES versions.
* *
* The @ref GLFW_OPENGL_FORWARD_COMPAT hint specifies whether the OpenGL * The @ref GLFW_OPENGL_FORWARD_COMPAT hint specifies whether the OpenGL
* context should be forward-compatible, i.e. one where all functionality * context should be forward-compatible, i.e. one where all functionality
@ -1058,8 +1062,8 @@ GLFWAPI void glfwDefaultWindowHints(void);
* the context for. Possible values are @ref GLFW_OPENGL_NO_PROFILE, @ref * the context for. Possible values are @ref GLFW_OPENGL_NO_PROFILE, @ref
* GLFW_OPENGL_CORE_PROFILE and @ref GLFW_OPENGL_COMPAT_PROFILE. * GLFW_OPENGL_CORE_PROFILE and @ref GLFW_OPENGL_COMPAT_PROFILE.
* *
* The @ref GLFW_OPENGL_ROBUSTNESS hint specifies the robustness strategy to be * The @ref GLFW_CONTEXT_ROBUSTNESS hint specifies the robustness strategy to
* used by the OpenGL context. * be used by the context.
* *
* The @ref GLFW_RESIZABLE hint specifies whether the window will be resizable * The @ref GLFW_RESIZABLE hint specifies whether the window will be resizable
* by the user. The window will still be resizable using the @ref * by the user. The window will still be resizable using the @ref
@ -1264,9 +1268,9 @@ GLFWAPI void glfwHideWindow(GLFWwindow window);
* The @ref GLFW_CLIENT_API property indicates the client API provided by the * The @ref GLFW_CLIENT_API property indicates the client API provided by the
* window's context. * window's context.
* *
* The @ref GLFW_OPENGL_VERSION_MAJOR, @ref GLFW_OPENGL_VERSION_MINOR and @ref * The @ref GLFW_CONTEXT_VERSION_MAJOR, @ref GLFW_CONTEXT_VERSION_MINOR and
* GLFW_OPENGL_REVISION properties indicate the API version of the window's * @ref GLFW_CONTEXT_REVISION properties indicate the client API version of the
* context. * window's context.
* *
* The @ref GLFW_OPENGL_FORWARD_COMPAT property indicates whether an OpenGL * The @ref GLFW_OPENGL_FORWARD_COMPAT property indicates whether an OpenGL
* context is forward-compatible. * context is forward-compatible.
@ -1278,9 +1282,8 @@ GLFWAPI void glfwHideWindow(GLFWwindow window);
* OpenGL context, or @ref GLFW_OPENGL_NO_PROFILE if the context is for another * OpenGL context, or @ref GLFW_OPENGL_NO_PROFILE if the context is for another
* client API than OpenGL. * client API than OpenGL.
* *
* The @ref GLFW_OPENGL_ROBUSTNESS property indicates the robustness strategy * The @ref GLFW_CONTEXT_ROBUSTNESS property indicates the robustness strategy
* used by the OpenGL context, or @ref GLFW_OPENGL_NO_ROBUSTNESS if robustness * used by the context, or @ref GLFW_NO_ROBUSTNESS if robustness is not used.
* is not used.
*/ */
GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param); GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param);
@ -1603,7 +1606,7 @@ GLFWAPI void glfwSetTime(double time);
/*! @brief Makes the context of the specified window current for this thread. /*! @brief Makes the context of the specified window current for this thread.
* @param[in] window The window whose context to make current, or @c NULL to * @param[in] window The window whose context to make current, or @c NULL to
* detach the current context. * detach the current context.
* @ingroup opengl * @ingroup context
* *
* @remarks This function may be called from secondary threads. * @remarks This function may be called from secondary threads.
* *
@ -1616,7 +1619,7 @@ GLFWAPI void glfwMakeContextCurrent(GLFWwindow window);
/*! @brief Returns the window whose context is current on this thread. /*! @brief Returns the window whose context is current on this thread.
* @return The window whose context is current, or @c NULL if no window's * @return The window whose context is current, or @c NULL if no window's
* context is current. * context is current.
* @ingroup opengl * @ingroup context
* *
* @remarks This function may be called from secondary threads. * @remarks This function may be called from secondary threads.
* *
@ -1626,7 +1629,7 @@ GLFWAPI GLFWwindow glfwGetCurrentContext(void);
/*! @brief Swaps the front and back buffers of the specified window. /*! @brief Swaps the front and back buffers of the specified window.
* @param[in] The window whose buffers to swap. * @param[in] The window whose buffers to swap.
* @ingroup opengl * @ingroup context
* *
* @remarks This function may be called from secondary threads. * @remarks This function may be called from secondary threads.
* *
@ -1637,7 +1640,7 @@ GLFWAPI void glfwSwapBuffers(GLFWwindow window);
/*! @brief Sets the swap interval for the current context. /*! @brief Sets the swap interval for the current context.
* @param[in] interval The minimum number of video frame periods to wait for * @param[in] interval The minimum number of video frame periods to wait for
* until the buffers are swapped by @ref glfwSwapBuffers. * until the buffers are swapped by @ref glfwSwapBuffers.
* @ingroup opengl * @ingroup context
* *
* @remarks This function may be called from secondary threads. * @remarks This function may be called from secondary threads.
* *
@ -1648,7 +1651,7 @@ GLFWAPI void glfwSwapInterval(int interval);
/*! @brief Checks whether the specified extension is available. /*! @brief Checks whether the specified extension is available.
* @param[in] extension The ASCII encoded name of the extension. * @param[in] extension The ASCII encoded name of the extension.
* @return @c GL_TRUE if the extension is available, or @c FALSE otherwise. * @return @c GL_TRUE if the extension is available, or @c FALSE otherwise.
* @ingroup opengl * @ingroup context
* *
* @remarks This function may be called from secondary threads. * @remarks This function may be called from secondary threads.
* *
@ -1662,7 +1665,7 @@ GLFWAPI int glfwExtensionSupported(const char* extension);
* @param[in] procname The ASCII encoded name of the function. * @param[in] procname The ASCII encoded name of the function.
* @return The address of the function, or @c NULL if the function is * @return The address of the function, or @c NULL if the function is
* unavailable. * unavailable.
* @ingroup opengl * @ingroup context
* *
* @remarks This function may be called from secondary threads. * @remarks This function may be called from secondary threads.
*/ */

View File

@ -377,8 +377,8 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
if (wndconfig->glRobustness) if (wndconfig->glRobustness)
{ {
if (wndconfig->glRobustness != GLFW_OPENGL_NO_RESET_NOTIFICATION && if (wndconfig->glRobustness != GLFW_NO_RESET_NOTIFICATION &&
wndconfig->glRobustness != GLFW_OPENGL_LOSE_CONTEXT_ON_RESET) wndconfig->glRobustness != GLFW_LOSE_CONTEXT_ON_RESET)
{ {
_glfwSetError(GLFW_INVALID_VALUE, _glfwSetError(GLFW_INVALID_VALUE,
"glfwCreateWindow: Invalid OpenGL robustness mode " "glfwCreateWindow: Invalid OpenGL robustness mode "

View File

@ -318,9 +318,9 @@ static int createContext(_GLFWwindow* window,
{ {
int strategy; int strategy;
if (wndconfig->glRobustness == GLFW_OPENGL_NO_RESET_NOTIFICATION) if (wndconfig->glRobustness == GLFW_NO_RESET_NOTIFICATION)
strategy = EGL_NO_RESET_NOTIFICATION_KHR; strategy = EGL_NO_RESET_NOTIFICATION_KHR;
else if (wndconfig->glRobustness == GLFW_OPENGL_LOSE_CONTEXT_ON_RESET) else if (wndconfig->glRobustness == GLFW_LOSE_CONTEXT_ON_RESET)
strategy = EGL_LOSE_CONTEXT_ON_RESET_KHR; strategy = EGL_LOSE_CONTEXT_ON_RESET_KHR;
setEGLattrib(attribs, index, EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR, strategy); setEGLattrib(attribs, index, EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR, strategy);

View File

@ -365,9 +365,9 @@ static int createContext(_GLFWwindow* window,
return GL_FALSE; return GL_FALSE;
} }
if (wndconfig->glRobustness == GLFW_OPENGL_NO_RESET_NOTIFICATION) if (wndconfig->glRobustness == GLFW_NO_RESET_NOTIFICATION)
strategy = GLX_NO_RESET_NOTIFICATION_ARB; strategy = GLX_NO_RESET_NOTIFICATION_ARB;
else if (wndconfig->glRobustness == GLFW_OPENGL_LOSE_CONTEXT_ON_RESET) else if (wndconfig->glRobustness == GLFW_LOSE_CONTEXT_ON_RESET)
strategy = GLX_LOSE_CONTEXT_ON_RESET_ARB; strategy = GLX_LOSE_CONTEXT_ON_RESET_ARB;
setGLXattrib(attribs, setGLXattrib(attribs,

View File

@ -434,9 +434,9 @@ static GLboolean createContext(_GLFWwindow* window,
return GL_FALSE; return GL_FALSE;
} }
if (wndconfig->glRobustness == GLFW_OPENGL_NO_RESET_NOTIFICATION) if (wndconfig->glRobustness == GLFW_NO_RESET_NOTIFICATION)
strategy = WGL_NO_RESET_NOTIFICATION_ARB; strategy = WGL_NO_RESET_NOTIFICATION_ARB;
else if (wndconfig->glRobustness == GLFW_OPENGL_LOSE_CONTEXT_ON_RESET) else if (wndconfig->glRobustness == GLFW_LOSE_CONTEXT_ON_RESET)
strategy = WGL_LOSE_CONTEXT_ON_RESET_ARB; strategy = WGL_LOSE_CONTEXT_ON_RESET_ARB;
attribs[i++] = WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB; attribs[i++] = WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB;

View File

@ -453,12 +453,15 @@ GLFWAPI void glfwWindowHint(int target, int hint)
case GLFW_CLIENT_API: case GLFW_CLIENT_API:
_glfwLibrary.hints.clientAPI = hint; _glfwLibrary.hints.clientAPI = hint;
break; break;
case GLFW_OPENGL_VERSION_MAJOR: case GLFW_CONTEXT_VERSION_MAJOR:
_glfwLibrary.hints.glMajor = hint; _glfwLibrary.hints.glMajor = hint;
break; break;
case GLFW_OPENGL_VERSION_MINOR: case GLFW_CONTEXT_VERSION_MINOR:
_glfwLibrary.hints.glMinor = hint; _glfwLibrary.hints.glMinor = hint;
break; break;
case GLFW_CONTEXT_ROBUSTNESS:
_glfwLibrary.hints.glRobustness = hint;
break;
case GLFW_OPENGL_FORWARD_COMPAT: case GLFW_OPENGL_FORWARD_COMPAT:
_glfwLibrary.hints.glForward = hint; _glfwLibrary.hints.glForward = hint;
break; break;
@ -468,9 +471,6 @@ GLFWAPI void glfwWindowHint(int target, int hint)
case GLFW_OPENGL_PROFILE: case GLFW_OPENGL_PROFILE:
_glfwLibrary.hints.glProfile = hint; _glfwLibrary.hints.glProfile = hint;
break; break;
case GLFW_OPENGL_ROBUSTNESS:
_glfwLibrary.hints.glRobustness = hint;
break;
default: default:
_glfwSetError(GLFW_INVALID_ENUM, NULL); _glfwSetError(GLFW_INVALID_ENUM, NULL);
break; break;
@ -717,20 +717,20 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param)
return window->positionY; return window->positionY;
case GLFW_CLIENT_API: case GLFW_CLIENT_API:
return window->clientAPI; return window->clientAPI;
case GLFW_OPENGL_VERSION_MAJOR: case GLFW_CONTEXT_VERSION_MAJOR:
return window->glMajor; return window->glMajor;
case GLFW_OPENGL_VERSION_MINOR: case GLFW_CONTEXT_VERSION_MINOR:
return window->glMinor; return window->glMinor;
case GLFW_OPENGL_REVISION: case GLFW_CONTEXT_REVISION:
return window->glRevision; return window->glRevision;
case GLFW_CONTEXT_ROBUSTNESS:
return window->glRobustness;
case GLFW_OPENGL_FORWARD_COMPAT: case GLFW_OPENGL_FORWARD_COMPAT:
return window->glForward; return window->glForward;
case GLFW_OPENGL_DEBUG_CONTEXT: case GLFW_OPENGL_DEBUG_CONTEXT:
return window->glDebug; return window->glDebug;
case GLFW_OPENGL_PROFILE: case GLFW_OPENGL_PROFILE:
return window->glProfile; return window->glProfile;
case GLFW_OPENGL_ROBUSTNESS:
return window->glRobustness;
} }
_glfwSetError(GLFW_INVALID_ENUM, NULL); _glfwSetError(GLFW_INVALID_ENUM, NULL);

View File

@ -64,8 +64,8 @@ static ParamGL gl_params[] =
static ParamGLFW glfw_params[] = static ParamGLFW glfw_params[] =
{ {
{ GLFW_REFRESH_RATE, "refresh rate" }, { GLFW_REFRESH_RATE, "refresh rate" },
{ GLFW_OPENGL_VERSION_MAJOR, "OpenGL major" }, { GLFW_CONTEXT_VERSION_MAJOR, "Context version major" },
{ GLFW_OPENGL_VERSION_MINOR, "OpenGL minor" }, { GLFW_CONTEXT_VERSION_MINOR, "Context version minor" },
{ GLFW_OPENGL_FORWARD_COMPAT, "OpenGL forward compatible" }, { GLFW_OPENGL_FORWARD_COMPAT, "OpenGL forward compatible" },
{ GLFW_OPENGL_DEBUG_CONTEXT, "OpenGL debug context" }, { GLFW_OPENGL_DEBUG_CONTEXT, "OpenGL debug context" },
{ GLFW_OPENGL_PROFILE, "OpenGL profile" }, { GLFW_OPENGL_PROFILE, "OpenGL profile" },

View File

@ -214,9 +214,9 @@ int main(int argc, char** argv)
break; break;
case 'r': case 'r':
if (strcasecmp(optarg, STRATEGY_NAME_NONE) == 0) if (strcasecmp(optarg, STRATEGY_NAME_NONE) == 0)
strategy = GLFW_OPENGL_NO_RESET_NOTIFICATION; strategy = GLFW_NO_RESET_NOTIFICATION;
else if (strcasecmp(optarg, STRATEGY_NAME_LOSE) == 0) else if (strcasecmp(optarg, STRATEGY_NAME_LOSE) == 0)
strategy = GLFW_OPENGL_LOSE_CONTEXT_ON_RESET; strategy = GLFW_LOSE_CONTEXT_ON_RESET;
else else
{ {
usage(); usage();
@ -244,8 +244,8 @@ int main(int argc, char** argv)
if (major != 1 || minor != 0) if (major != 1 || minor != 0)
{ {
glfwWindowHint(GLFW_OPENGL_VERSION_MAJOR, major); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, major);
glfwWindowHint(GLFW_OPENGL_VERSION_MINOR, minor); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minor);
} }
if (api != 0) if (api != 0)
@ -261,7 +261,7 @@ int main(int argc, char** argv)
glfwWindowHint(GLFW_OPENGL_PROFILE, profile); glfwWindowHint(GLFW_OPENGL_PROFILE, profile);
if (strategy) if (strategy)
glfwWindowHint(GLFW_OPENGL_ROBUSTNESS, strategy); glfwWindowHint(GLFW_CONTEXT_ROBUSTNESS, strategy);
glfwWindowHint(GLFW_VISIBLE, GL_FALSE); glfwWindowHint(GLFW_VISIBLE, GL_FALSE);
@ -280,9 +280,9 @@ int main(int argc, char** argv)
// Report client API version // Report client API version
api = glfwGetWindowParam(window, GLFW_CLIENT_API); api = glfwGetWindowParam(window, GLFW_CLIENT_API);
major = glfwGetWindowParam(window, GLFW_OPENGL_VERSION_MAJOR); major = glfwGetWindowParam(window, GLFW_CONTEXT_VERSION_MAJOR);
minor = glfwGetWindowParam(window, GLFW_OPENGL_VERSION_MINOR); minor = glfwGetWindowParam(window, GLFW_CONTEXT_VERSION_MINOR);
revision = glfwGetWindowParam(window, GLFW_OPENGL_REVISION); revision = glfwGetWindowParam(window, GLFW_CONTEXT_REVISION);
printf("%s context version string: \"%s\"\n", printf("%s context version string: \"%s\"\n",
get_client_api_name(api), get_client_api_name(api),