Oh, it works. Thank you~

On Monday, September 7, 2015 at 10:57:53 PM UTC+8, swiftcoder wrote:
>
> Subdivide your polygons into triangles, and render them using GL_TRIANGLES.
>
> This is is exactly what OpenGL is going to do under the hood anyway, since 
> the graphics card can only rasterise triangles.
>
> On Mon, 7 Sep 2015 at 00:04 yyao <yyao...@gmail.com <javascript:>> wrote:
>
>> Hi, I'm new to pyglet. I want to simulate a bunch of balls' movement. 
>> These balls are rendered as 12 vertices polygon. Because there are a huge 
>> number of  balls, almost 1000, I want to draw the balls in one draw call. 
>> However, the document said that the behavior of GL_POLYGON in Batch.draw is 
>> undefined because of shared state. So how could I optimize my program? 
>> Thank you.
>>
>> -- 
>> 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 pyglet-users...@googlegroups.com <javascript:>.
>> To post to this group, send email to pyglet...@googlegroups.com 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/pyglet-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 pyglet-users+unsubscr...@googlegroups.com.
To post to this group, send email to pyglet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to