What is glutDisplayFunc?

glutDisplayFunc sets the display callback for the current window. When GLUT determines that the normal plane for the window needs to be redisplayed, the display callback for the window is called.

What type of function is glutDisplayFunc ()?

glutDisplayFunc(void (*func)(void)) is the first and most important event callback function you will see. Whenever GLUT determines that the contents of the window need to be redisplayed, the callback function registered by glutDisplayFunc() is executed.

What is callback function in opengl?

A callback function is a function which the library (GLUT) calls when it needs to know how to proccess something. e.g. when glut gets a key down event it uses the glutKeybourdFunc callback routine to find out what to do with a key press.

What is glutCreateWindow?

DESCRIPTION. glutCreateWindow creates a top-level window. The name will be provided to the window system as the window’s name. The intent is that the window system will label the window with the name. Implicitly, the current window is set to the newly created window.

What is glutMainLoop?

glutMainLoop tells the program to enter the GLUT event processing loop. (This just means the program sits and waits for things to happen, such as window refreshes, window resizes, mouse clicks, key presses, etc.) glutMainLoop never exits, so it should always be the last line of the main program.

What is the use of OpenGL?

OpenGL (Open Graphics Library) is a software interface to graphics hardware. The interface consists of over 250 different function calls which can be used to draw complex two and three-dimensional scenes from simple geometric primitives such as points, lines, and polygons.

What is glVertex3f?

glVertex => allows you to define where the vertex is in space. if you have glVertex3f that means you have three floating point values. floating point means you have decimals versus integers which are whole numbers. the three values are x,y,z.

What is glFlush in OpenGL?

glFlush() empties all commands in these buffers and forces all pending commands will to be executed immediately without waiting buffers are full. Therefore glFlush() guarantees that all OpenGL commands made up to that point will complete executions in a finite amount time after calling glFlush().

What is glutMainLoop in OpenGL?

What is glutInitWindowSize?

glutInitWindowSize – Requests future windows to open at a given width/height..

What is glutReshapeFunc?

Description. glutReshapeFunc sets the reshape callback for the current window. The reshape callback is triggered when a window is reshaped. A reshape callback is also triggered immediately before a window’s first display callback after a window is created or whenever an overlay for the window is established.

What is glutInit?

glutInit is used to initialize the GLUT library. Usage. void glutInit(int *argcp, char **argv); argcp. A pointer to the program’s unmodified argc variable from main.