MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / timerEvent

Function timerEvent

cpp/5_Domain_Specific/postProcessGL/main.cpp:503–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503void timerEvent(int value)
504{
505 if (animate) {
506 rotate[0] += 0.2f;
507
508 if (rotate[0] > 360.0f) {
509 rotate[0] -= 360.0f;
510 }
511
512 rotate[1] += 0.6f;
513
514 if (rotate[1] > 360.0f) {
515 rotate[1] -= 360.0f;
516 }
517
518 rotate[2] += 1.0f;
519
520 if (rotate[2] > 360.0f) {
521 rotate[2] -= 360.0f;
522 }
523 }
524
525 glutPostRedisplay();
526 glutTimerFunc(REFRESH_DELAY, timerEvent, 0);
527}
528
529////////////////////////////////////////////////////////////////////////////////
530//! Keyboard events handler

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected