must be
glRotatef(rtri, 0.0, 0.0, 1.0)
, else you are doing a strange projection
--
claudio

On Wed, Apr 21, 2010 at 8:10 AM, Alejandro Castellanos <
[email protected]> wrote:

> I should probably start this with saying that I'm a total OpenGL newb,
> but I've been catching up on some tutorials and I've gotten stumped by
> this seemingly insignificant problem.
>
> I should, in theory, be rotating a triangle around the Y axis, but for
> some reason the triangle appears as is, but with an invisible section
> (as if it was slashed). The example is extremely basic so whatever I'm
> doing wrong ought to be easily visible, I think...either that or
> there's something wrong with my copy of pyglet.
>
> Here's the code:
>
> # -*- coding: cp1252 -*-
> import pyglet
> import math
> from pyglet.gl import *
>
> # Direct OpenGL commands to this window.
> window = pyglet.window.Window(resizable=True)
>
> @window.event
> def on_draw():
>    glClear(GL_COLOR_BUFFER_BIT)
>    glLoadIdentity()
>
>    rtri = 0.15
>    glRotatef(rtri,0.0,0.5,0.0)
>
>    glBegin(GL_TRIANGLES)
>    glColor3f(1.0,0.0,0.0)
>    glVertex3f(window.width/2,window.height,0.0)
>
>    glColor3f(0.0,1.0,0.0
>    glVertex3f(100.0,0.0,0.0)
>
>    glColor3f(0.0,0.0,1.0)
>    glVertex3f(window.width,0.0,0.0)
>    glEnd()
>
>
> pyglet.app.run()
>
>
>
> So, there it is. Thanks in advance for any help.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to