bug in sfml?

Started by
10 comments, last by swiftcoder 12 years, 2 months ago

[quote name='ms75214' timestamp='1328576394' post='4910362']
I have used the following code to render the texture in a different program, and it looks fine:

Did you render it on a black background, at a similarly large size?
[/quote]


OOps. When I make her big, that stuff is there:

http://i1190.photobucket.com/albums/z449/m75214/oops.png


But, here's what happens when I do the premult in SFML:

http://i1190.photobucket.com/albums/z449/m75214/premult.png


however, when i change GL_LINEAR to GL_NEAREST, looks good:

http://i1190.photobucket.com/albums/z449/m75214/looksok.png

so, if i do this in sfml:

stand_Image.SetSmooth(false);

it's good:

http://i1190.photobucket.com/albums/z449/m75214/looksgood.png
Advertisement

But, here's what happens when I do the premult in SFML: http://i1190.photobucket.com/albums/z449/m75214/premult.png

For premult to work, you actually have to pre-multiply each pixel in the image by its alpha value, before you load it into OpenGL.

In an ideal world, SFML would take care of this for you, but the boneheads in charge aren't keen on this sort of thing :)

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement