I have a tricky problem with Blending: I have stored a 3D-Object in a data-structure containing coordinates, normals, texture-Coords, and COLOR for EACH vertex. Then I just use Vertex-Arrays (glDrawArray) to display the entire object…the problem is that I want to make the object TRANSPARENT. it sounds very simple but things become (for me) very hard when I discovered that I cant just use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) because the COLOR-ARRAY contains RGB values and so, the ALPHA value for each vertex will be ALWAYS set to 1.0!!!
So how can I blend an object with RGBA COLOR-DATA still defined for each vertex???
I have to say also an important thing: to avoid this problem I have tried to set BlendFunc(GL_DST_COLOR, GL_ZERO) then I set the current color to (1.0, 1.0, 1.0, ALPHA) and render the entire geometry of the object with texturemapping and all the other stuff DISABLED! Then, I made a second-pass in which I enabled texture map and rendered the object with glBlend(GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA)… I cant understand why, but this method simply DOESN’T WORK!!! !!! … some people told me that some gfx-cards dont support DST_ALPHA :-?..Can you give me any suggestion please?? I dont how to solve this problem.
THANX!