Thanks again for the help! I'll dig around some more and see what works.

One thing I found that did work is using a stack of OpenGL commands to 
directly affect the colors being drawn, but that's a clumsy solution 
because it affects *all* the colors, not just specific ones. The shader 
I've created uses a kind of chromakey system, where only certain colors are 
replaced.

    glPushAttrib(GL_TEXTURE_BIT)
    glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR,
               (GLfloat * 4)(*flashing_colors()))
    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE)
    glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_CONSTANT)
    game.text_batch.draw()
    glPopAttrib()

This tints everything in game.text_batch with a color supplied by the 
flashing_colors() function. If I set the text color to white, it works, but 
again, it isn't actually keyed to replace a single color -- and from all 
I've seen, you're supposed to use shaders for this kind of functionality 
anyway.

-- 
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/d/optout.

Reply via email to