On Oct 29, 1:15 pm, Jonathan Hartley <[email protected]> wrote:
> On Oct 29, 1:30 am, B W <[email protected]> wrote:
>
>
>
> > On Thu, Oct 28, 2010 at 10:27 AM, Tristam MacDonald 
> > <[email protected]>wrote:
>
> > > However, if you want to get into shaders, you want to use GLSL (preferably
> > > OpenGL 2+), so that rules out the GMA 950 anyway.
>
> > > I seem to recall someone--maybe you, Tristam?--wrote a Python binding for
>
> > GLSL.
>
> > There is also one here:http://code.google.com/p/pyglet-shaders/
>
> > Could you recommend a good choice for a beginner?
>
> > Gumm
>
> I'm the author of the pyglet-shaders repo linked above. It works great
> for my uses, but only has a basic useage in mind, i.e. it's good for
> loading and compiling one vertex shader and one fragment shader,
> binding them at the start of the program, and using them for
> everything the program does. Presumably it could be cajoled into using
> different shaders for different draw calls without too much trouble,
> but I personally haven't done that.
>
> I wrote it mostly for my own education, based upon looking at other
> people's shader code, which I generally found by searching
> code.google.com for python and the appropriate shader-compiling opengl
> calls.
>
>   Jonathan

On reflection, there shader-wrapping code in PyOpenGL, which is far
better than my pyglet-shaders repo.

PyOpenGL's equivalent covers a much broader set of use cases (caters
to binding uniform variables, etc, which I didn't even attempt)

Also, it is well-documented:
http://pyopengl.sourceforge.net/documentation/pydoc/OpenGL.GL.shaders.html

And comes with a shaders-from-pyopengl tutorial:
http://pyopengl.sourceforge.net/context/tutorials/index.xhtml

I have long wanted to sit down and work through this tutorial, and by
co-incidence I have carved out time to do it this coming week. If
anyone else wants to work through it in parallel and email each other
our questions, observations and show-off our respective working code,
then I'd love to do that.

  Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to