Re: [PyOpenGL-Users] PyOpenGL Deprecation & New Methods
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2009-12-11 16:04:17
|
Greg Ewing wrote: > Gijs wrote: > >> I've never found a good replacement for >> display lists. Nor do I understand why they are deprecated at all. >> > > This worries me, too. My guess is they are reasoning that there > is no performance advantage in using display lists if you use > vertex arrays and/or VBOs instead of glVertex calls. > > This might possibly be true, *if* you're programming in C. But > it's not true at all in Python where function calls are expensive. > A display list can wrap up a sequence of just about any kind of > call, including lighting, texture, matrix changes, etc., into > something that can be fired off using just one Python call, > and that can give you a huge speed advantage. > > I'm hoping that something akin to display lists will continue > to be available, maybe in glu or another library, if they are > dropped from the core of GL. > > Personally I'm ignoring GL 3.0 for now and hoping it's just > a bad dream that will go away. As long as 2.x still works, > I'll continue to use it. If it ever stops working, and there > isn't a compatibility library available already, I'll write > one myself to cover the things I don't want to do without. > Display lists are definitely the more flexible path. They are currently being implemented in the GL/drivers rather than in hardware. Basically they just record your high-level GL commands and play them back (in C) when you call them. There's no reason you couldn't implement that in C, Cython, or what have you. It will, however, top out at a certain level of complexity and doesn't particularly allow for more "modern" rendering effects. For most PyOpenGL users, not a big deal and a bridge API would be fine. You're going to be transferring your data on each rendering pass, but if you've got a small data-set, no problem. More involved/advanced implementations could even compile down to VBOs and shaders for you... but given that the GPU manufacturers consider that too much effort, it might not be worth it. For the broader OpenGL market, VBOs, FBOs, PBOs and shaders are a more open-ended solutions. Basically there's just no way to do most of the things people want to provide in "real" game engines these days with display lists. While PyOpenGL's "market" tends to be people doing simple data-visualization and people wanting to learn 3d graphics, OpenGL is chasing a different market. The vendors seem to have realized that killing off the "legacy" market isn't a good idea for their bottom line, so I'd guess the 2.x APIs will be around for a good while. Enjoy, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |