Original Post
Hello,
I am having trouble with blending on my models. My model is an airplane with transparencies for the props. I can get the alpha channel (black) on the props image to match the glClearColor , but this basically only turns the alpha portion of the image to my clear color and doesnt let the wing portion of the model come through the "transparent" portion of the texture.
image settings:
glTexImage2D(GL_TEXTURE_2D, 0,4, Width, Height, 0,
GL_RGBA, GL_UNSIGNED_BYTE, PixelBuffer);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
blend settings:
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
Then draw it:
Is there a texture flag that I need to set differently ? I have tried turning culling off, setting the depth mask to false,etc.
I have also tried setting the blend func to every conceivable combinination:
Thanks in advance for any light you can shed on this.
J