Thanks for the pointers!  I have found basic tutorials for gaussian blurs 
using opengl, but in other languages, so I've just been figuring out how to 
replicate the same ideas in python.  I haven't written any code yet, aside 
from what exists for my actual pyglet program itself.  Once I actually have 
something to show I'll look into setting up a repository.

On Monday, 15 August 2016 22:44:07 UTC-6, Benjamin Moran wrote:
>
> Hi Erik, 
>
> It looks like gletools hasn't been updated in a long time, and probably 
> doesn't work anymore with the recent pyglet versions. Pyglet basically just 
> lets you use raw OpenGL, so you can follow along with any standard tuturial 
> if you wish, providing you're not scared of ctypes. 
>
> There is a nice writeup here by Leonhard Vogt that shows rendering to a 
> texture at a low level with pyglet, that might be useful:
>
> https://leovt.wordpress.com/2015/10/04/render-to-texture-with-python-3-and-pyglet/
> You likely don't need most of that code thanks to Gabriel's shader 
> library, but it might be worth a look to see what's going on at a lower 
> level. 
>
> I haven't done any woth with gaussian blurs myself, so I'm not sure if 
> this is useful. If you have some example code in a github/bitbucket repo 
> somewhere, it might be easier for people to have a look to see if you're 
> making any simple mistakes.
>
> -Ben
>
>
>
>
> On Tuesday, August 16, 2016 at 6:24:27 AM UTC+9, Erik Olson wrote:
>>
>> Alright.  After working with Gabriel Dube a bit, he figured out what was 
>> keeping pyshaders from running on my computer (Thanks!).  Now that this 
>> works, I'm looking more again into the actual how of getting a decent 
>> shader setup working.  Most everything I can find regarding gaussian blurs 
>> recommends the use of a two-pass system, blurring the image first 
>> horizontally and then vertically.  This seems to necessitate the use of 
>> FBOs.  What support exists for using FBOs with pyglet?  I've been trying to 
>> get GLETools up and running, but I keep getting the following error when 
>> trying to import it:
>>
>> Traceback (most recent call last):
>>   File 
>> "C:\Users\Erik\Documents\Programming\workspace\dsafsa\src\tdytd.py", line 
>> 7, in <module>
>>     import gletools
>>   File 
>> "C:\Users\Erik\Anaconda3\lib\site-packages\gletools-0.1.0-py3.5.egg\gletools\__init__.py",
>>  
>> line 8, in <module>
>>   File 
>> "C:\Users\Erik\Anaconda3\lib\site-packages\gletools-0.1.0-py3.5.egg\gletools\framebuffer.py",
>>  
>> line 12, in <module>
>> ImportError: cannot import name 'nested'
>>
>> Any ideas?
>>
>> On Monday, 18 July 2016 11:02:41 UTC-6, 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.

Reply via email to