On 20/10/13 23:26, Richard Jones wrote: > I can think of three ways to achieve the goal, off the top of my head, > no code written: > > 1. manually construct a texture using the rendered text textures > generated by pyglet as the alpha channel in a texture with the gradient > in the colour components. Hard. > 2. use a fragment shader to combine two textures - the text render and a > gradient texture. Easier. > 3. use a fragment shader to generate the gradient colour to render on > the fly when rendering the text texture, modulated by the colour from > the text texture. Easiest.
Bonus! if you want to play with shaders, I've found this class from Cocos2D very useful: http://los-cocos.googlecode.com/svn/trunk/cocos/shader.py Regards, Juan -- 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 http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/groups/opt_out.
