I would like to now how i can blend my pic so that the black on my pic won’t be visable.
My problem: I would like to make a tree, i have a nice pic for it. But the outside of the pic is black. I also have a mask of the pic. I would like to know how i can easily get rid of the black in my pic? I seen it done in projects with blending and i just would like to know how this is done. In simple explanation
He meant that you should conver the image data from RGB to RGBA (after you loaded it from file, but before uploaded to OpenGL), copying each RGB value from the old image to the new image, and fill the alpha channel with one or zero, depending on if the color of the pixel is black or not.
The upload it like this: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, …, GL_RGBA, UNSIGNED_BYTE, newData);