DEV Community

Creating a window in opengl

dwarfŧ on January 28, 2023

step 1 Install opengl on your device. I am using ubuntu but you can use any os. I installed opengl from here. step 2 Creating a window is the hard...
Collapse
 
abstratovcm profile image
Vinícius do Carmo Melício

What is glFlush() for in this context?

Collapse
 
dwarft profile image
dwarfŧ

if you remove it the background color will not be white (for linux anyway) but thanky you for the question :)

Collapse
 
abstratovcm profile image
Vinícius do Carmo Melício

I was wondering why my project didn't need a glFlush to change the background color, but it calls a function called glutSwapBuffers that apparently does an implicit glFlush. It was cool to find out, thanks for the post!