I coded a new blend. (DX / opengl)
INVERTBLEND is it usefull for 2D game ?
BlitzMax Forums/BlitzMax Beginners Area/INVERTBLEND is it usefull for 2D game ? It's useful if it works on all machines?
Hi Ed, Nice one, do you know if there is something like 'addblend' in OpenGL or DX. I don't know exactly about the renderstates of DX, so I can't do it by myself. But i think something like this would be perfect for lights and so on.
I made several tests. I think I found the ADDBLEND
How should invertblend be used?
here is an example .
But I wonder if it is really usefull for game coding.
But I wonder if it is really usefull for game coding.
Strict Graphics 800,600,0 SetClsColor 105,0,200 While Not KeyHit(KEY_ESCAPE) Cls SetBlend SOLIDBLEND SetColor 255,255,255 DrawRect 100,100,100,100 SetColor 255,255,0 DrawRect 205,100,100,100 SetColor 0,0,255 DrawRect 100,205,100,100 SetColor 0,255,0 DrawRect 205,205,100,100 '--------------------------- SetBlend INVERTBLEND SetColor 255,255,255 DrawRect 150,150,100,100 '--------------------------- Flip Wend
Is it ADDBLEND ?
RED + GREEN = YELLOW 255,0,0 + 0,255,0 = 255,255,0
RED + BLUE = PURPLE 255,0,0 + 0,0,255 = 255,0,255
RED + GREEN = YELLOW 255,0,0 + 0,255,0 = 255,255,0
RED + BLUE = PURPLE 255,0,0 + 0,0,255 = 255,0,255
Yes, this should it be, It would be nice to test this .
Isn't LIGHTBLEND already an add mode?