It's worth documenting, it I wouldn't intentionally limit the version. Upgrading batch to work with modern OpenGL is a reasonable priority - on Mac today your choice is OpenGL 2.0 or 4.2 (there is no way to allocate a context between those two versions), so batch is basically useless. On Fri, Feb 19, 2016 at 2:53 AM, Benjamin Moran <[email protected]> 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. > -- 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.
