OpenGL implementation of 3D cube