1
votes

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

1
So you can use Core graphics instead of openGL..i have made "Easy Doodle" using Core graphics available on iTunes. You want to make like this or something different.?Rock
I already programmed it in Core Graphics, performance was really slow on the ipad. so I need to move to OpenGLCarson
Carson, did you check that your brush has alpha 1.0? Otherwise you would not cover the background completely (so if you paint multiple times with alpha for example 0.5, background will be still visible). This is caused by blending mode.brigadir

1 Answers

0
votes

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