Got the opengl code to draw correctly