I'd go with modernizing batch support first if possible, since that would be far more broadly useful, with shader support to follow afterwards.
Perhaps there's a way to have pre- and post-3.0 Batch usage supported side-by-side; you select which one you want by way of the window creation options. On Friday, February 19, 2016 at 5:53:47 AM UTC-5, Benjamin Moran wrote: > > > As some of you probably already know, it's not possible to use the > built-in pyglet.graphics.Batch() and vertex_lists with an OpenGL context > that is later than 3.0. > (Due to deprecated OpenGL functions that are used by those classes, such > as "glPushClientAttrib"). > > My question is whether or not it makes sense to limit shader support to > GLSL 1.30 (OpenGL 3.0 GLSL), in order to allow Batch usage? GLSL 130 > shaders and Batch drawing does work together, but I've never mixed it this > way before. > > Idealy the Batch class could be modernized to take advantage of OpenGL > 3.2+ when such a context is available, but that's a bit beyond my current > understanding. > > Any feedback welcome! > -Ben > > > On Tuesday, February 16, 2016 at 9:53:46 AM UTC+9, Benjamin Moran wrote: >> >> Hi guys, >> >> How would everyone feel about adding a simple shader Class to the >> graphics module? There have been a few go-to examples out there, such as >> Tristan McDonald's popular one here: >> https://swiftcoder.wordpress.com/2008/12/19/simple-glsl-wrapper-for-pyglet/ >> And Leonhard Vogt's framebuffer code that includes shaders here: >> >> https://leovt.wordpress.com/2015/10/04/render-to-texture-with-python-3-and-pyglet/ >> https://github.com/leovt/leovt/blob/master/framebuffer.py >> >> The reason I would like to see it included is because of the ctypes magic >> being a bit of a blocker for new users. A simple class could handle this >> for the users, and allow them to easily try more modern contexts with >> pyglet. >> >> If I wrote this code, would it be accepted? I'm thinking a simple class, >> plus basic example code. (Speaking of which, many of those examples need to >> be updated!) >> >> -Ben >> >> -- 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.
