[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Shaders and Examples not Working
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Shaders and Examples not Working
- From: "René Dudfield" <renesd@xxxxxxxxx>
- Date: Wed, 22 Oct 2008 11:58:08 +1100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 21 Oct 2008 20:58:14 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=QySlzUG70O5IyN7Kil+bUBz4GA+72KDyf/aTLsiqQqw=; b=sYgBD/RqrcbAl25NtncY1xuLp8rVgq5twhGmObsHK3aTFVq5CMtpeXOY+bSRiRKjjC +yNHc7WxOTqdNJpa6x2EIcO/Qr3TOd5C4ePd33YLhEsG1vpSbuYH21H5CAhh1EJm+MfI 3BVT40yoKXHzgKrobHwNfzqI03Wy9W2vvF5ho=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=FS8Tw42E24ynI1aXwWFnS7Goz1d8Rry3O6UZNBMk/QBE74oAAaFhOuyv1dSA2ZwlP4 mxbsKf8aforOZpG4lprHUDgb8raR2YTeLtMNW13PntPdcyHKzlDF5SWE0XLAec+N/ORm bjA93/caCLPLH25o9TrxeoTIzAl0eSPL/vvGc=
- In-reply-to: <a62fab400810201942u47264073l4420e0196e34d51@xxxxxxxxxxxxxx>
- References: <a62fab400810201942u47264073l4420e0196e34d51@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi,
at one point they did work...
However pyopengl 3 is still in beta and has been changing a lot
recently... causing some things to fail.
There's been a recent fix in cvs to get them working on windows again
(I think your platform).
I know that recently a bunch of shader examples were added to cvs too.
So... use pyopengl cvs, and help out with bug reports and patches :)
Mike is pretty responsive over there, but if you have any patches I
can apply them as well if you need.
cheers,
On Tue, Oct 21, 2008 at 1:42 PM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
> Hi,
>
> I've been doing lots of cool stuff with PyOpenGL, but frankly, with cooler
> effects comes more complexity, and when things get more complex, PyOpenGL
> "fixed function" techniques do not seem to be the answer. A dynamically
> rendered cubic reflectionmapped object is complicated enough. So is a
> dynamically updated framebuffer shadowmapped object. I just barely got
> these working, and they aren't simple to implement at all. Try putting the
> two together? How would you add real-time refraction? Caustics? Some of
> these fixed function effects aren't exact either, and some are slow.
>
> The solution, I've gathered from day 1, is to use shaders, which are
> programs run on the GPU. They're faster, simpler to use, more powerful and
> flexible, and all-around just cool. That's great and everything, but
> shaders, simplifying and inherently simple though they are, seem immune to
> implementation in PyGame, by which I mean, no one seems to know how to do
> it. Which brings me to my point, or rather my exception. There are shader
> examples on our very own pygame.org. However, neither of the shader
> examples work for me, even after I made the obvious modifications.
>
> The obvious observations were made:
> -These apparently worked as recently as OpenGL 2.0, which is recent, but not
> amazingly so.
> -My computer does support shaders, so it's not a hardware issue--It was
> bought after these tutorials were written, and it was middle-range at that
> time. Further, PyGlet shader programs, and commercial programs seem to work
> just dapper.
> -Aside from these tutorials, no other shader examples in PyGame and PyOpenGL
> could be had anywhere on the net.
> -PyGlet supports shaders, but PyGame doesn't? Seems improbable, as shaders
> are PyOpenGL stuff. Does PyGlet use the PyOpenGL port of the outdated
> OpenGL 2.0? If so, why did the PyOpenGL people depreciate what they call
> "the future of graphics" in a newer release? OpenGL 2.1 sure doesn't.
>
> So, does anyone know how to make a shader program? They should be really
> simple judging by the complexity of the broken examples and what I already
> know on the topic. Perhaps someone who knows a bit more PyOpenGL and/or is
> more familiar with Python and/or PyGame than I do could write a new
> tutorial?
>
> I'm really hoping to get somewhere with shaders, but the examples on
> pygame.org don't work.
>
> Please help, thanks,
> Ian
>