Thank you for the feedback. I tried running the code with a different
without much luck. However, I'm starting the think the problem is
camera. Current code:
On Jul 8, 11:35 pm, Casey Duncan <
casey.dun...@gmail.com> wrote:
> self.window = pyglet.window.Window(640, 480)
>
> This will setup a 2D orthographic projection by default, obviously a
> sphere is 3D, which is why you can't see it. You need to setup a 3D
> projection. Which you can do with something like this:
>
> glViewport(0, 0, self.window.width, self.window.height)
> glMatrixMode(GL_PROJECTION)
> glLoadIdentity()
> gluPerspective(70, 1.0*self.window.width/self.window.height, 0.1, 1000.0)
> glMatrixMode(GL_MODELVIEW)
> glLoadIdentity()
>
> This sets up a perspective projection, you can also setup a 3D ortho
> projection if you don't want foreshortening. Use glOrtho for that.
>
> If you make your window resizeable put the above code in an
> on_resize(width, height) handler method on the window.
>
> hth,
>
> -Casey
>