I’m brand new to this forum and to OpenGL ES. I’m writing an application that needs to allow the user to draw on a background image and, when they’re done, put their drawing (excluding the background image) into a new image with a transparent background. I’ve tried several different approaches unsuccessfully so I’m finally breaking down and asking for some help
Of all the approaches I’ve tried, the most workable seems to be to use two FBOs each with their own color renderbuffer – one for on-screen drawing and one for off-screen. I render the background image to the first FBO but not to the second. I then render all user drawing (done using point sprites and a pen texture) to both FBOs. The first FBO I display on-screen since it includes the background image and the second I keep off-screen and use to extract the user drawing sans background when I need to.
The problem I’m having is that the drawing rendered to the second FBO has a solid background I can’t seem to get rid of. What can I do to create an image with the user’s drawing on a transparent background from it? I’ve tried removing the solid color through other means, but the point sprite blending makes the edges of the lines look like a mess.
I realize this approach may be completely wrong, so feel free to bash it if there’s something I could be doing better.
The other problem I’m facing is how to get rid of the thin black border that all my point sprites seem to have. The texture being used for the point sprite is a 16x16 image of a circle on a transparent background. I saw one person solved this by turning off depth checking but I don’t have that on to begin with. It’s odd because the transparency of the 16x16 image is being preserved (I see a circle and not a square) but the circle has a thin black border.
Any help that anyone could provide would be most appreciated. I’ve been pulling my hair out for a few days trying to get this working. I can provide code examples if that would be helpful at all.