generate an alpha channel to the tree.bmp so when the color is black the alpha value is 0 and else 255, then use blending with glBlendfunc(gl_src_alpha, gl_one_minus_src_alpha) or glAlphaFunc(GL_Greater,0.5)
there are other ways, but try this first.
If you use the above mentioned method, you don’t have to enable blending at all. Pixels with alpha less than 0.5 (in this case, where there “are no tree” in the texture) is rejected, and blending is unecessary.
If you DO want to use blending, the result will be slightly better. But not very noticable to a user unaware of whats going on. You also have to sort the trees and draw them from back to front.
So my advice is to skip blending. I do so in my engine, and it looks great.
[This message has been edited by Bob (edited 01-11-2001).]
Well, I originally said two techniques, one with blending (which can generate soft edges) and one with alpha test (with can be faster).
For the one with blending, yes you need to do glEnable(GL_BLEND).
For the one with alpha, you should call glEnable(GL_ALPHA_TEST)
Sorry about the lower case macros in my first post.