- https://open.gl/introduction looks very good
Double Buffering (from http://www.glfw.org/docs/latest/quick.html)
GLFW windows by default use double buffering. That means that each window has two rendering buffers; a front buffer and a back buffer. The front buffer is the one being displayed and the back buffer the one you render to.
When the entire frame has been rendered, the buffers need to be swapped with one another, so the back buffer becomes the front buffer and vice versa.
glfwSwapBuffers(window);
RGBA colors (from https://www.opengl.org/sdk/docs/man2/xhtml/glColor.xml)
void glColor4i( GLint red,
GLint green,
GLint blue,
GLint alpha);
Depth buffer (from https://open.gl/depthstencils, but also on https://www.opengl.org/archives/resources/faq/technical/depthbuffer.htm)
glEnable(GL_DEPTH_TEST);
general information about what a depth-/z-buffer is: https://de.wikipedia.org/wiki/Z-Buffer
Clear Buffers (from https://www.opengl.org/discussion_boards/showthread.php/128606-how-to-clear-screen-after-drawing)
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // clear colors to black
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // apply cleared color buffer & clear the depth buffer
Set matrix mode (from https://www.opengl.org/sdk/docs/man2/xhtml/glMatrixMode.xml)
void glMatrixMode( GLenum mode);
Good tutorial: https://wiki.delphigl.com/index.php/glBegin