removed framerate limit in opengl + nanovg demo for window smoother dragging

This commit is contained in:
vurtun 2015-09-23 16:59:31 +02:00
parent 6db3603267
commit f4f15045eb
2 changed files with 0 additions and 16 deletions

View File

@ -251,8 +251,6 @@ main(int argc, char *argv[])
SDL_Window *win;
SDL_GLContext glContext;
NVGcontext *vg = NULL;
unsigned int started;
unsigned int dt;
/* GUI */
struct demo_gui gui;
@ -298,7 +296,6 @@ main(int argc, char *argv[])
while (gui.running) {
/* Input */
SDL_Event evt;
started = SDL_GetTicks();
zr_input_begin(&gui.input);
while (SDL_PollEvent(&evt)) {
if (evt.type == SDL_WINDOWEVENT) resize(&evt);
@ -323,11 +320,6 @@ main(int argc, char *argv[])
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
draw(vg, &gui.queue, width, height);
SDL_GL_SwapWindow(win);
/* Timing */
dt = SDL_GetTicks() - started;
if (dt < DTIME)
SDL_Delay(DTIME - dt);
}
cleanup:

View File

@ -446,8 +446,6 @@ main(int argc, char *argv[])
SDL_Window *win;
SDL_GLContext glContext;
int win_width, win_height;
unsigned int started;
unsigned int dt;
int width = 0, height = 0;
/* GUI */
@ -491,7 +489,6 @@ main(int argc, char *argv[])
while (gui.running) {
/* Input */
SDL_Event evt;
started = SDL_GetTicks();
zr_input_begin(&gui.input);
while (SDL_PollEvent(&evt)) {
if (evt.type == SDL_WINDOWEVENT) resize(&evt);
@ -518,11 +515,6 @@ main(int argc, char *argv[])
glClearColor(0.4f, 0.4f, 0.4f, 1.0f);
device_draw(&device, &gui.queue, width, height);
SDL_GL_SwapWindow(win);
/* Timing */
dt = SDL_GetTicks() - started;
if (dt < DTIME)
SDL_Delay(DTIME - dt);
}
cleanup: