PDA

View Full Version : Need help with some animation with the glutIdleFunc



fipil123
03-04-2017, 02:48 PM
It's for my homework. We were told to draw some silly landscape and animate some parts. Im new to OPENGL and coding and my coding is terrible. I'll post my enormous code below. I want to animate the waves ( made a function makeWaves()) for that, want to use the glutIdleFunc with one parameter ( another function void onIdle() {
time++;
glutPostRedisplay();
}

(( Edit: code deleted ))

Dark Photon
03-05-2017, 12:51 PM
Hi fipil123. I removed your program since this is homework, you posted the whole thing, and you didn't really ask any specific questions.

If you have specific OpenGL questions, feel free to ask them here. If you have a "short" snippet of code you want to post that illustrates your specific question, that's fine. But please avoid posting large amounts of code. This isn't a debugging service, and it will increase the likelihood that nobody takes the time to pick through it and try to help you.

In the future, if/when you post a code snippet, please surround it with tags (... or
...) as it makes it much easier for folks to read. Thanks.