mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Formatting.
This commit is contained in:
parent
554bf5d321
commit
6da82e0ffe
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user