1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Renamed GLFW_SAMPLES and GLFW_SHOULD_CLOSE.

This commit is contained in:
Camilla Berglund 2012-12-31 19:45:13 +01:00
parent 8db1528c74
commit 21f41a2bb7
15 changed files with 24 additions and 23 deletions

View File

@ -614,7 +614,7 @@ int main( void )
/* Check if we are still running */ /* Check if we are still running */
if (glfwGetKey( window, GLFW_KEY_ESCAPE )) if (glfwGetKey( window, GLFW_KEY_ESCAPE ))
break; break;
if (glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED)) if (glfwGetWindowParam(window, GLFW_SHOULD_CLOSE))
break; break;
} }

View File

@ -502,7 +502,7 @@ int main(void)
// Check if the ESC key was pressed or the window should be closed // Check if the ESC key was pressed or the window should be closed
if (glfwGetKey(window, GLFW_KEY_ESCAPE)) if (glfwGetKey(window, GLFW_KEY_ESCAPE))
break; break;
if (glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED)) if (glfwGetWindowParam(window, GLFW_SHOULD_CLOSE))
break; break;
} }

View File

@ -90,7 +90,7 @@ int main(void)
// Check if the ESC key was pressed or the window should be closed // Check if the ESC key was pressed or the window should be closed
if (glfwGetKey(window, GLFW_KEY_ESCAPE)) if (glfwGetKey(window, GLFW_KEY_ESCAPE))
break; break;
if (glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED)) if (glfwGetWindowParam(window, GLFW_SHOULD_CLOSE))
break; break;
} }

View File

@ -481,7 +481,7 @@ extern "C" {
* otherwise. * otherwise.
* @see glfwGetWindowParam * @see glfwGetWindowParam
*/ */
#define GLFW_CLOSE_REQUESTED 0x00020003 #define GLFW_SHOULD_CLOSE 0x00020003
/*! @brief The client API version revision. /*! @brief The client API version revision.
* @see glfwGetWindowParam * @see glfwGetWindowParam
*/ */
@ -543,7 +543,7 @@ extern "C" {
* zero to disable multisampling. * zero to disable multisampling.
* @see glfwWindowHint * @see glfwWindowHint
*/ */
#define GLFW_FSAA_SAMPLES 0x0002100E #define GLFW_SAMPLES 0x0002100E
/*! @brief @c GL_TRUE if the framebuffer should be sRGB capable, or @c GL_FALSE /*! @brief @c GL_TRUE if the framebuffer should be sRGB capable, or @c GL_FALSE
* otherwise. * otherwise.
* @see glfwWindowHint * @see glfwWindowHint
@ -1075,8 +1075,8 @@ GLFWAPI void glfwDefaultWindowHints(void);
* *
* The @ref GLFW_STEREO hint specifies whether to use stereoscopic rendering. * The @ref GLFW_STEREO hint specifies whether to use stereoscopic rendering.
* *
* The @ref GLFW_FSAA_SAMPLES hint specifies the desired number of samples to * The @ref GLFW_SAMPLES hint specifies the desired number of samples to use
* use for multisampling. * for multisampling.
* *
* The @ref GLFW_SRGB_CAPABLE hint specifies whether the framebuffer should be * The @ref GLFW_SRGB_CAPABLE hint specifies whether the framebuffer should be
* sRGB capable. * sRGB capable.
@ -1304,7 +1304,7 @@ GLFWAPI void glfwHideWindow(GLFWwindow window);
* The @ref GLFW_RESIZABLE property indicates whether the window is resizable * The @ref GLFW_RESIZABLE property indicates whether the window is resizable
* by the user. * by the user.
* *
* The @ref GLFW_CLOSE_REQUESTED property indicates whether the window has been * The @ref GLFW_SHOULD_CLOSE property indicates whether the window has been
* requested by the user to close. * requested by the user to close.
* *
* The @ref GLFW_REFRESH_RATE property will be replaced when the @c * The @ref GLFW_REFRESH_RATE property will be replaced when the @c
@ -1383,7 +1383,7 @@ GLFWAPI void glfwSetWindowSizeCallback(GLFWwindow window, GLFWwindowsizefun cbfu
* callback to be called. * callback to be called.
* *
* The return value of the close callback becomes the new value of the @ref * The return value of the close callback becomes the new value of the @ref
* GLFW_CLOSE_REQUESTED window parameter. * GLFW_SHOULD_CLOSE window parameter.
*/ */
GLFWAPI void glfwSetWindowCloseCallback(GLFWwindow window, GLFWwindowclosefun cbfun); GLFWAPI void glfwSetWindowCloseCallback(GLFWwindow window, GLFWwindowclosefun cbfun);

View File

@ -301,6 +301,7 @@ version of GLFW.</p>
<li>Renamed <code>glfw.h</code> to <code>glfw3.h</code> to avoid conflicts with 2.x series</li> <li>Renamed <code>glfw.h</code> to <code>glfw3.h</code> to avoid conflicts with 2.x series</li>
<li>Renamed <code>glfwOpenWindowHint</code> to <code>glfwWindowHint</code></li> <li>Renamed <code>glfwOpenWindowHint</code> to <code>glfwWindowHint</code></li>
<li>Renamed <code>GLFW_ACTIVE</code> to <code>GLFW_FOCUSED</code></li> <li>Renamed <code>GLFW_ACTIVE</code> to <code>GLFW_FOCUSED</code></li>
<li>Renamed <code>GLFW_FSAA_SAMPLES</code> to <code>GLFW_SAMPLES</code></li>
<li>Renamed <code>GLFW_WINDOW</code> token to <code>GLFW_WINDOWED</code></li> <li>Renamed <code>GLFW_WINDOW</code> token to <code>GLFW_WINDOWED</code></li>
<li>Renamed <code>GLFW_WINDOW_NO_RESIZE</code> to <code>GLFW_RESIZABLE</code></li> <li>Renamed <code>GLFW_WINDOW_NO_RESIZE</code> to <code>GLFW_RESIZABLE</code></li>
<li>Renamed <code>GLFW_BUILD_DLL</code> to <code>_GLFW_BUILD_DLL</code></li> <li>Renamed <code>GLFW_BUILD_DLL</code> to <code>_GLFW_BUILD_DLL</code></li>
@ -314,7 +315,7 @@ version of GLFW.</p>
<li>Replaced mouse wheel interface with two-dimensional, floating point scrolling interface</li> <li>Replaced mouse wheel interface with two-dimensional, floating point scrolling interface</li>
<li>Replaced <code>glfwEnable</code> and <code>glfwDisable</code> with <code>glfwGetInputMode</code> and <code>glfwSetInputMode</code></li> <li>Replaced <code>glfwEnable</code> and <code>glfwDisable</code> with <code>glfwGetInputMode</code> and <code>glfwSetInputMode</code></li>
<li>Replaced <code>joystick</code> test with graphical version</li> <li>Replaced <code>joystick</code> test with graphical version</li>
<li>Replaced automatic closing of windows with <code>GLFW_CLOSE_REQUESTED</code> window parameter</li> <li>Replaced automatic closing of windows with <code>GLFW_SHOULD_CLOSE</code> window parameter</li>
<li>Removed the <code>GLFW_KEY_REPEAT</code> input option</li> <li>Removed the <code>GLFW_KEY_REPEAT</code> input option</li>
<li>Removed event auto-polling and the <code>GLFW_AUTO_POLL_EVENTS</code> window enable</li> <li>Removed event auto-polling and the <code>GLFW_AUTO_POLL_EVENTS</code> window enable</li>
<li>Removed the Win32 port .def files</li> <li>Removed the Win32 port .def files</li>

View File

@ -442,7 +442,7 @@ GLFWAPI void glfwWindowHint(int target, int hint)
case GLFW_POSITION_Y: case GLFW_POSITION_Y:
_glfwLibrary.hints.positionY = hint; _glfwLibrary.hints.positionY = hint;
break; break;
case GLFW_FSAA_SAMPLES: case GLFW_SAMPLES:
_glfwLibrary.hints.samples = hint; _glfwLibrary.hints.samples = hint;
break; break;
case GLFW_SRGB_CAPABLE: case GLFW_SRGB_CAPABLE:
@ -715,7 +715,7 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param)
return window == _glfwLibrary.focusedWindow; return window == _glfwLibrary.focusedWindow;
case GLFW_ICONIFIED: case GLFW_ICONIFIED:
return window->iconified; return window->iconified;
case GLFW_CLOSE_REQUESTED: case GLFW_SHOULD_CLOSE:
return window->closeRequested; return window->closeRequested;
case GLFW_REFRESH_RATE: case GLFW_REFRESH_RATE:
return window->refreshRate; return window->refreshRate;

View File

@ -108,7 +108,7 @@ int main(void)
set_swap_interval(window, swap_interval); set_swap_interval(window, swap_interval);
while (!glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED)) while (!glfwGetWindowParam(window, GLFW_SHOULD_CLOSE))
{ {
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);

View File

@ -386,7 +386,7 @@ int main(void)
printf("Main loop starting\n"); printf("Main loop starting\n");
while (!glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED)) while (!glfwGetWindowParam(window, GLFW_SHOULD_CLOSE))
glfwWaitEvents(); glfwWaitEvents();
glfwTerminate(); glfwTerminate();

View File

@ -97,7 +97,7 @@ int main(int argc, char** argv)
else else
printf("Requesting that FSAA not be available\n"); printf("Requesting that FSAA not be available\n");
glfwWindowHint(GLFW_FSAA_SAMPLES, samples); glfwWindowHint(GLFW_SAMPLES, samples);
window = glfwCreateWindow(800, 400, GLFW_WINDOWED, "Aliasing Detector", NULL); window = glfwCreateWindow(800, 400, GLFW_WINDOWED, "Aliasing Detector", NULL);
if (!window) if (!window)
@ -128,7 +128,7 @@ int main(int argc, char** argv)
gluOrtho2D(0.f, 1.f, 0.f, 0.5f); gluOrtho2D(0.f, 1.f, 0.f, 0.5f);
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
while (!glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED)) while (!glfwGetWindowParam(window, GLFW_SHOULD_CLOSE))
{ {
GLfloat time = (GLfloat) glfwGetTime(); GLfloat time = (GLfloat) glfwGetTime();

View File

@ -207,7 +207,7 @@ int main(void)
glfwMakeContextCurrent(window); glfwMakeContextCurrent(window);
glfwSwapInterval(1); glfwSwapInterval(1);
while (!glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED)) while (!glfwGetWindowParam(window, GLFW_SHOULD_CLOSE))
{ {
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);

View File

@ -129,7 +129,7 @@ int main(void)
glClearColor(0.f, 0.f, 0.f, 0.f); glClearColor(0.f, 0.f, 0.f, 0.f);
while (!glfwGetWindowParam(window_handle, GLFW_CLOSE_REQUESTED)) while (!glfwGetWindowParam(window_handle, GLFW_SHOULD_CLOSE))
{ {
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);

View File

@ -91,7 +91,7 @@ int main(void)
glOrtho(-1.f, 1.f, -1.f, 1.f, 1.f, -1.f); glOrtho(-1.f, 1.f, -1.f, 1.f, 1.f, -1.f);
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);
while (!glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED)) while (!glfwGetWindowParam(window, GLFW_SHOULD_CLOSE))
{ {
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);

View File

@ -122,7 +122,7 @@ int main(void)
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
if (glfwGetWindowParam(threads[i].window, GLFW_CLOSE_REQUESTED)) if (glfwGetWindowParam(threads[i].window, GLFW_SHOULD_CLOSE))
running = GL_FALSE; running = GL_FALSE;
} }
} }

View File

@ -63,7 +63,7 @@ int main(void)
glfwSetWindowSizeCallback(window, window_size_callback); glfwSetWindowSizeCallback(window, window_size_callback);
while (!glfwGetWindowParam(window, GLFW_CLOSE_REQUESTED)) while (!glfwGetWindowParam(window, GLFW_SHOULD_CLOSE))
{ {
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(window); glfwSwapBuffers(window);

View File

@ -82,7 +82,7 @@ int main(void)
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(windows[i]); glfwSwapBuffers(windows[i]);
if (glfwGetWindowParam(windows[i], GLFW_CLOSE_REQUESTED)) if (glfwGetWindowParam(windows[i], GLFW_SHOULD_CLOSE))
running = GL_FALSE; running = GL_FALSE;
} }