Updates to rendering functions

Rendering is basically finished now. GLFW header had to be moved to
after glfunctions.h inclusion, because it appears to define opengl to
version 1.1 somehow.