Have you 'flattened' the array 'np' of vertex positions?
For your second code sample (with glVertex) I think np must be
something like:
np = ((11, 12), (13, 14), (15, 16), (17, 18))
But if you use 'graphics.draw' instead of glVertex, then I think np
should be:
np = (11, 12, 13, 14, 15, 16, 17, 18)
On Sep 16, 2:49 pm, "Lucio Torre" <[EMAIL PROTECTED]> wrote:
> during pyweek i had some issues with pyglet.
> first, using framebuffer objs and vertex lists caused a memory error
> somewhere.
> then, my machine gives segmentation fault 1 every 3 times while
> starting our game. it just happens on my machine. i think sound has
> something to do (ubuntu64bits)
>
> then, using pyglet.graphics draw gave me some issues of flicker and
> strange problems (sometimes it looked like a vertex was missing).
>
> i had the following code:
>
> pyglet.graphics.draw(4, GL_QUADS,
> ("v2f", np),
> ("t2f", [a,b,c,d,e,f,g,h[),
> ("c4B", [255,255,255,self.alpha]*4),
> )
>
> and had this visual issues. so i replaced it by:
>
> glColor4ub(255,255,255,self.alpha)
> glBegin(GL_QUADS)
> glTexCoord2f(a,b)
> glVertex2f(*np[0])
> glTexCoord2f(c,d)
> glVertex2f(*np[1])
> glTexCoord2f(e,f)
> glVertex2f(*np[2])
> glTexCoord2f(g,h)
> glVertex2f(*np[3])
> glEnd()
> glColor4ub(255,255,255,255)
>
> and things worked perfectly.
>
> regards,
>
> lucio.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---