[cairo] Fwd: Re: [Mesa3d-dev] more glitz points

Brian Paul brian.paul at tungstengraphics.com
Wed Apr 21 11:25:01 PDT 2004


David Reveman wrote:
> On Wed, 2004-04-21 at 09:33 -0700, Jon Smirl wrote:
>>--- Brian Paul <brian.paul at tungstengraphics.com> wrote:
>>>>             
>>>>    Most programmatic surfaces are implemented using fragment programs and
>>>>    they will only be available on hardware supporting the fragment program
>>>>    extension.
>>>
>>>You certainly don't need fragment programs to do color gradients like 
>>>those.  At worst, you have to just compute per-vertex texcoords to do 
>>>radial gradients.  You can use texgen for texcoords for linear 
>>>gradients.  I've done both in past projects (long before fragment 
>>>programs existed).
> 
> You're probably right, and I'd love if someone would contribute with
> some code that could do this. Although I think it might be hard make it
> work with glitz's rendering model (the xrender model). It might also be
> hard to make it support the different spread types; pad, repeat and
> reflect.

Pad, repeat and reflect sound like OpenGL's GL_CLAMP, GL_REPEAT and 
GL_MIRRORED_REPEAT texture wrap modes.

I could probably whip up a GLUT demo showing various kinds of gradient 
rendering.  Would that help?


>>>It's not clear if the position of the gradients is window-relative or 
>>>object-relative, BTW.
> 
> window-relative.

OK.

-Brian





More information about the cairo mailing list