On Thu, Feb 14, 2008 at 5:54 PM, Patrick Devine <[EMAIL PROTECTED]> wrote:
> > I've been pretty disappointed with the 2d drawing primitives that are > out there right now so I set about writing my own. I wanted to > somewhat replicate pygame's functionality and have cleaner code which > was as well documented as pyglet. So far I've implemented rect(), > circle(), ellipse(), line() and lines(). I still need to get around > to polygon() and arc(), but I would imagine I can finish those up this > weekend if anyone is interested. > > Also, I'm not (yet) optimizing with display lists but I would imagine > the code could be modified to do that as well. > > Let me know if anyone is interested. > > --Patrick. > I think a 2D drawing primitives shim library might make sense for a very simple 2D application - a Logo-like game or something. In such instances, "optimizing" with display lists would be almost silly, though. In other applications, building more complex structures out of the functions provided by a 2D primitives shim library would almost never be a good idea. For a structure build out of 10,000 lines, for example, you wind up an excess 10,000 function calls just for a little API gloss. And (unless your interfaces are really weird, which would defeat the point), you end up with 10,000 glBegin/glEnd pairs instead of one - and I don't think display lists cut out such redundancies. There is also very little difficulty in making such abstractions (with the exception of tessellated polygons, b-splines, etc.), so I personally would put it in a utils module per application, rather than imposing another dependency and worry about deployment and potential licensing conflicts. Cheers, -- \\\\\/\"/\\\\\\\\\\\ \\\\/ // //\/\\\\\\\ \\\/ \\// /\ \/\\\\ \\/ /\/ / /\/ /\ \\\ \/ / /\/ /\ /\\\ \\ / /\\\ /\\\ \\\\\/\ \/\\\\\/\\\\\/\\\\\\ d.p.s --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
