Sorry I am not sure what you mean by wind the vertices. I was under the 
impression strip was used for a circle that isn't filled which is why I 
wanted to use fan. I so tried that as well but didn't get desirable results.

Here is a test I worked on:
import pyglet, math, random
from pyglet.gl import *

window = pyglet.window.Window(800,600)

batch = pyglet.graphics.Batch()

def createCircle(x, y, radius, batch):
 circle = create_vertices(x, y, radius)
 vertex_list = batch.add(len(circle[1])//2, pyglet.gl.GL_TRIANGLE_FAN, None,
 circle,('c4f',(1, 1, 1, 0.8)*(len(circle[1])//2)))


def create_vertices(x, y, radius, sides=24):
 verts = []
 for i in range(sides+1):
 vertex = [x + (radius * math.cos(i *  (2*math.pi) / sides)),
 y + (radius * math.sin(i * (2*math.pi) / sides))]
 verts += vertex
 if i == 0 or i == sides:
 verts += vertex
 
 return ('v2f', verts)
 
for i in range(2):
 createCircle(window.width*random.random(), window.height*random.random(), 
10, batch)


@window.event
def on_draw():
 window.clear()
 batch.draw()
 
pyglet.app.run()
 


On Monday, January 18, 2016 at 11:52:19 PM UTC-6, elliot wrote:
>
> Use triangle strips.  Wind the vertices (google it or I can post an 
> example later, on my phone right now).  Start with the first vertex twice 
> (ie, repeat it) and end with the last twice.  If it still isn't working, 
> post your code that attempts to incorporate these changes.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to