diff --git a/src/x11_platform.h b/src/x11_platform.h index b3cf642e..70a57b84 100644 --- a/src/x11_platform.h +++ b/src/x11_platform.h @@ -193,7 +193,7 @@ typedef struct _GLFWlibraryX11 } Xkb; // Key code LUT (mapping X11 key codes to GLFW key codes) - int keyCodeLUT[256]; + int keyCodeLUT[256]; // Screensaver data struct { @@ -222,7 +222,7 @@ typedef struct _GLFWlibraryX11 struct { GLboolean monotonic; double resolution; - uint64_t t0; + uint64_t base; } timer; #if defined(_GLFW_DLOPEN_LIBGL) diff --git a/src/x11_time.c b/src/x11_time.c index 431389c4..e2203941 100644 --- a/src/x11_time.c +++ b/src/x11_time.c @@ -78,7 +78,7 @@ void _glfwInitTimer(void) _glfwLibrary.X11.timer.resolution = 1e-6; } - _glfwLibrary.X11.timer.t0 = getRawTime(); + _glfwLibrary.X11.timer.base = getRawTime(); } @@ -92,7 +92,7 @@ void _glfwInitTimer(void) double _glfwPlatformGetTime(void) { - return (double) (getRawTime() - _glfwLibrary.X11.timer.t0) * + return (double) (getRawTime() - _glfwLibrary.X11.timer.base) * _glfwLibrary.X11.timer.resolution; } @@ -101,9 +101,9 @@ double _glfwPlatformGetTime(void) // Set timer value in seconds //======================================================================== -void _glfwPlatformSetTime(double t) +void _glfwPlatformSetTime(double time) { - _glfwLibrary.X11.timer.t0 = getRawTime() - - (uint64_t) (t / _glfwLibrary.X11.timer.resolution); + _glfwLibrary.X11.timer.base = getRawTime() - + (uint64_t) (time / _glfwLibrary.X11.timer.resolution); } diff --git a/tests/accuracy.c b/tests/accuracy.c index c3bebaca..f235cf75 100644 --- a/tests/accuracy.c +++ b/tests/accuracy.c @@ -78,17 +78,10 @@ int main(void) glfwSetWindowSizeCallback(window_size_callback); glfwSwapInterval(1); - glClearColor(0, 0, 0, 0); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - while (glfwIsWindow(window)) { glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1.f, 1.f, 1.f); - glBegin(GL_LINES); glVertex2f(0.f, (GLfloat) window_height - cursor_y); glVertex2f((GLfloat) window_width, (GLfloat) window_height - cursor_y); diff --git a/tests/fsaa.c b/tests/fsaa.c index 404e77f4..6cdb77e0 100644 --- a/tests/fsaa.c +++ b/tests/fsaa.c @@ -132,8 +132,6 @@ int main(int argc, char** argv) glClear(GL_COLOR_BUFFER_BIT); - glColor3f(1.f, 1.f, 1.f); - glLoadIdentity(); glTranslatef(0.25f, 0.25f, 0.f); glRotatef(time, 0.f, 0.f, 1.f); diff --git a/tests/reopen.c b/tests/reopen.c index 9d76580f..5040697f 100644 --- a/tests/reopen.c +++ b/tests/reopen.c @@ -136,9 +136,6 @@ int main(int argc, char** argv) glOrtho(-1.f, 1.f, -1.f, 1.f, 1.f, -1.f); glMatrixMode(GL_MODELVIEW); - glClearColor(0.f, 0.f, 0.f, 0.f); - glColor3f(1.f, 1.f, 1.f); - glfwSetTime(0.0); while (glfwGetTime() < 5.0) diff --git a/tests/tearing.c b/tests/tearing.c index 6e43e88f..10170b0f 100644 --- a/tests/tearing.c +++ b/tests/tearing.c @@ -62,9 +62,6 @@ int main(void) glfwSetWindowSizeCallback(window_size_callback); glfwSwapInterval(1); - glClearColor(0.f, 0.f, 0.f, 0.f); - glColor3f(1.f, 1.f, 1.f); - glMatrixMode(GL_PROJECTION); glOrtho(-1.f, 1.f, -1.f, 1.f, 1.f, -1.f); glMatrixMode(GL_MODELVIEW);