setup opengl to render