()
| 412 | } |
| 413 | |
| 414 | if (!needsRepainting()) { |
| 415 | if (!isThreaded) { |
| 416 | pollEvents(); |
| 417 | } |
| 418 | return; |
| 419 | } |
| 420 | |
| 421 | if (renderControl.skipRender()) { |
| 422 | |
| 423 | if (!isThreaded) pollEvents(); |
| 424 | return; |
| 425 | } |
| 426 | |
| 427 | needsRepainting = false; |
| 428 | glfwMakeContextCurrent(window); |
| 429 | try { |
| 430 | glfwSwapInterval(0); |
| 431 | |
| 432 | GL.setCapabilities(glcontext); |
| 433 | |
| 434 | int w = glfwGetWindowWidth(window); |
| 435 | int h = glfwGetWindowHeight(window); |
| 436 | |
| 437 | if (w != this.w || h != this.h) { |
| 438 | GraphicsContext.isResizing = true; |
| 439 | this.w = w; |
| 440 | this.h = h; |
| 441 | } else { |
| 442 | GraphicsContext.isResizing = false; |
| 443 | } |
| 444 | |
| 445 | updateScene(); |
| 446 | |
| 447 | frame++; |
| 448 | if (!dontSwap) { |
| 449 | swapControl.swap(window); |
| 450 | } |
| 451 | |
| 452 | interframeTime = System.currentTimeMillis() - lastFrameAt; |
| 453 | lastFrameAt = System.currentTimeMillis(); |
| 454 | |
| 455 | |
| 456 | if (interframeTime > 1000 / 45.) |
| 457 | System.err.print("."); |
| 458 | else if (interframeTime > 1000 / 74.) |
| 459 | System.err.print("^"); |
| 460 | else if (interframeTime > 1000 / 80.) |
| 461 | System.err.print("a"); |
| 462 | else if (interframeTime > 1000 / 95.) |
| 463 | System.err.print("b"); |
| 464 | else if (interframeTime > 1000 / 110.) |
| 465 | System.err.print("c"); |
| 466 | else { |
| 467 | // System.err.println(1000/(float)interframeTime); |
| 468 | System.err.print(","); |
| 469 | } |
| 470 | |
| 471 |
no test coverage detected