08.01.2015 Views

OpenGL viewing notes - Bryn Mawr Computer Science

OpenGL viewing notes - Bryn Mawr Computer Science

OpenGL viewing notes - Bryn Mawr Computer Science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Idle Callback<br />

<br />

<br />

Minimize the amount of computation done in<br />

an idle callback.<br />

If using idle for animation, stop rendering<br />

when nothing changed, or window not<br />

visible<br />

glutVisibilityFunc(visible);<br />

void visible(int vis) {<br />

if (vis == GLUT_VISIBLE)<br />

glutIdleFunc(idle);<br />

else<br />

glutIdleFunc(NULL);<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!