dark colors dont work properly
I have tried various blend modifications to no avail....
If you use a darker color in GLPaint sample this happens, link to image attached:
http://www.studionu.nu/files/GLPaint_dark_color.png
As you can see , the "M" stands out even after painting over the image.
Does anybody have a clue as to what is going on here and how to fix it?
Thanks
I am using glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); (premultiplied)
and I tried glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
EDIT: here is the file based on GLPaint for simplicity sake.
I have an example of the code which is a problem in a copy of GLPaint, apples basic drawing app. Here is the link..... Maybe you could look at it. I have overidden the color change function so that it starts with red and changes to dark red when you select any of the colors.....
http://www.studionu.net/files/GLPaint.zip
It's likely because of the blending mode selected, i can't remember the specifics, but it looks like your using multiply style of blending, where brighter colours shine through darker ones.
Choose a different Blending method so that the new colour is the newly applied colour, not a combination of two colours
Edit:
OpenGL Blending Options:
http://pyopengl.sourceforge.net/documentation/manual/glBlendFunc.3G.html
链接地址: http://www.djcxy.com/p/34006.html下一篇: 深色不工作正常