I'm not very familiar with the library yet, but from what I can see it requires activating some extensions for higher level GLSL support. If you can share a copy of the code you're trying to run, I can give it a try here. You might also consider just openening up a ticket on the project page if it turns out to be a bug.
On Thursday, July 21, 2016 at 5:14:31 AM UTC+9, Erik Olson wrote: > > Thanks for the suggestion! I'm currently looking it over. I tried > inserting the strings for an example vertex and fragment shader I found, > but I haven't been able to get pyshaders to work. It keeps giving the > following error: > > Traceback (most recent call last): >> File >> "C:\Users\Erik\Documents\Programming\workspace\drawingLessons\src\draw.py", >> line 12, in <module> >> import pyshaders >> File "C:\Users\Erik\Anaconda2\lib\site-packages\pyshaders.py", line 167 >> c_type, bcount, setter, *mat_size = UNIFORMS_DATA[type] >> ^ >> SyntaxError: invalid syntax >> > Not really sure what's going on there. As far as I can tell the error > seems to be an issue with pyshaders itself. > > > > On Wednesday, 20 July 2016 02:57:32 UTC-6, Benjamin Moran wrote: >> >> Hi Erik, >> >> I think the issue with shaders on pyglet at the moment is that you need >> some ctypes knowlege in order to make use of the OpenGL bindings. There >> aren't currently any built-in abstractions that make things easier. >> >> However, Gabriel Dube has recently released a new shader library for >> pyglet: https://github.com/gabdube/pyshaders >> That may do what you want. Have a look, and post back. >> >> -Ben >> >> >> On Tuesday, July 19, 2016 at 2:02:41 AM UTC+9, Erik Olson wrote: >>> >>> Hello! >>> >>> I am currently using pyglet for neuroscience research and have >>> encountered an issue. The program I currently have draws simple black >>> primitives (triangle fans, etc.) to a blank white screen. What I would >>> like to do now is to be able to draw some of the primitives which represent >>> a background, apply a gaussian blur using a shader, then draw the remaining >>> objects on top, unblurred. I have found extensive examples of shader >>> classes to use in pyglet, along with resources stating how to write shaders >>> in GLSL. However, I have found practically nothing explaining how to use >>> existing shaders to actually do things. Currently I am working with >>> Tristam McDonald's shader class, but I have no idea how I would actually >>> get such shaders to apply to what appears on the screen. >>> >>> What should the code actually look like? Are there any good resources >>> or examples (which I seem to be completely unable to find)? It seems like >>> anywhere discussing how to use shaders glosses over this part, which makes >>> me wonder if it's really obvious and I'm just an idiot. >>> >> -- 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.
