Ahh, I see. The answer is obvious now that it has been explained :-)
Thanks! On Jul 27, 9:36 am, Tristam MacDonald <[email protected]> wrote: > On Sun, Jul 26, 2009 at 4:51 PM, SlowLearner <[email protected]>wrote: > > > > > > > Hi, > > > Thanks for getting back to me. > > > So, just to confirm I have this right: > > > With draw_indexed I can only colour the vertices once, in one hit. In > > other words I can use draw_indexed if I want rainbow colours or want > > the cube (or whatever 3d shape I am doing) to be just one colour. > > > If I want faces of different colours I need to define each face > > individually so I can set the colour/normals for each face. > > > If so I thought that might be the case but I wanted to check that I > > had not missed anything before I went too far down that road as the > > draw_indexed command is so "short and sweet". > > Nope. You can pass one colour and one normal per vertex. The trick is to > duplicate vertices where necessary, so that each can have the right colour. > > Using this method, cube requires 6 faces x 4 vertices = 24 > vertices, rather than the usual 8, but with the advantage of a single draw > call (which is much faster 6 smaller draw calls). > > -- > Tristam MacDonaldhttp://swiftcoder.wordpress.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
