..proper GL blending mode..
BlitzMax Forums/BlitzMax Programming/..proper GL blending mode..
| ||
..i would like to do simple transparency over textured quad..texture used on quad has no alpha, so i wanna adjust that by color RGBA value..I have set this blending mode glEnable(GL_BLEND) glEnable(GL_ALPHA_TEST) glBlendColor(1, 1, 1, .5) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) so it does what i want, BUT everything behind seems to be like ADD blend mode(brightened up), while i want just simple transparency.. what would be a proper way?? |
| ||
..okay..i have been using wrongly glBlendColor()..instead glColor4f() doing fine..but now, my quad completely disappear if i have alpha value 0.5 and below, while up is fine..why is that? glColor4f(1,1,1,0.51) works glColor4f(1,1,1,0.5) quad completely transparent, invisible... huhh.. EDIT: okay..got it fixed..it was glEnable(GL_ALPHA_TEST) so i changed it in to glEnable(GL_ALPHA) end everything is fine...sorry for bothering..:) |