Ahar! Thanks - so it does. Thanks very much for the pointer.

I shall interpret that as a clue as I look for why the text looks
black in my own application. Obviously I made sure that vertex color
is set to something non-black, but that hasn't fixed it.




On Nov 19, 8:29 pm, Tristam MacDonald <[email protected]> wrote:
> On Thu, Nov 19, 2009 at 3:27 PM, Tristam MacDonald 
> <[email protected]>wrote:
>
>
>
> > On Thu, Nov 19, 2009 at 3:06 PM, Jonathan Hartley 
> > <[email protected]>wrote:
>
> >> I just realised I understand even less than I thought I did.
>
> >> The 'glColor3f(1.0, 0.0, 0.0)' in 'on_draw()', four lines from the
> >> bottom of that linked to code snippet. Modifying it demonstrates that
> >> it controls the color of the texture that then gets blitted to the
> >> screen. How the heck does that work? Surely the color of the pixels in
> >> the texture are already set long before 'on_draw()' gets invoked?
>
> > If GL_COLOR_MATERIAL is enabled, OpenGL multiplies all texture colours by
> > the interpolated vertex colour during texture-mapping.
>
> > Thus, as long as the pixels in your texture are something sensible (i.e.
> > white), you can use glColor to re-colour the rendered texture on the fly.
>
> Scratch that, I was thinking of lighting.
>
> The vertex colour *always* multiplies the texture pixel colour.
>
> --
> Tristam MacDonaldhttp://swiftcoder.wordpress.com/

--

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].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=.


Reply via email to