Hi all.

I'm trying to convert convert a Label into an Image, to use as a
sprite image.

I'm trying out some code I found posted by pyalot, here on this list:
http://groups.google.com/group/pyglet-users/browse_thread/thread/b6c0fa3550c37e97/4e3c71bd18df799c

My problem is that the text always comes out black (rather than the
Label.__init__() 'color' param.)
Alex suggests in that post that this can be fixed by changing the
texture creation format from GL_RGBA to GL_ALPHA, but this doesn't
seem to fix the problem for me - even though pyalot reported it worked
for them.

Has anyone got any clues for how I might fix this? Thanks!


The reason I'm doing this is that I want the text on screen to slowly
fade away. It will be used as floaty 'points scored' visual feedback
in the game. I plan to achieve this using the sprite.opacity property.
I was previously doing it by simply using a Label on screen, and
modifying its color every frame to make it gradually more transparent.
But as has been discussed elsewhere on this list, this causes a lot of
work to be done under the covers, and it wasn't fast enough when there
were lots of them on screen. If there are better approaches than the
one I'm trying above, I'd be all ears. Thanks.

--

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