--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
I have noticed one strange behavior when trying to display a PNG file.
For example, using the following image:
http://i.imgur.com/65CT3.png
With:
python pyglet/examples/image_display.py 65CT3.png
results in a very dim version of the image being displayed. It almost
looks like a black image with nothing there, but the original version is
faintly visible. It seems to be specific to the PNG format (maybe a
transparency issue?), since a JPG version of the image shows up no
problem. Also, I have tried the same PNG on other back ends with pyglet
(windows, etc) and the image shows up as expected.
Any ideas?
Thanks!
-Charles.
~ Nathan
One more quick note:
The quartz image loader now automatically loads in images with
premultiplied alpha by default. There doesn't seem to be any easy way
around this. So this means that you should use the correct blending
function for premultiplied alpha, which is
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA)
or if using the sprite module, set your sprite's blend_src to GL_ONE.
Otherwise, you'll end up with dark fringes around your images.
--phillip
> What are peoples thoughts are normalising this by making pre-multiplied
> alpha the default for loaders on all platforms?
Whatever behaviour is chosen, it should definitely be the
same on all platforms.
--
Greg
Well, I don't have any objections. But then, I don't really know much
about OpenGL. :-)
~ Nathan
swiftcoder wrote:
I'm inclined to agree. You can do everything with premultiplied
alpha that you can do with non-premultiplied, and more besides.
For example, you can overlay fire or glow effects that add light
without darkening what's behind.
--
Greg
downgrading nvidia drivers from version 295 to 280 fixed the problem.
However, this only works with the latest pyglet dev version - if you
have the python-pyglet package installed that ships with ubuntu, the
program will still freeze.
andreas
2012/3/15 Михаил Сидоров <pev...@gmail.com>: