INVERTBLEND is it usefull for 2D game ?

BlitzMax Forums/BlitzMax Beginners Area/INVERTBLEND is it usefull for 2D game ?

Red(Posted 2005) [#1]
I coded a new blend. (DX / opengl)


Robert Cummings(Posted 2005) [#2]
It's useful if it works on all machines?


Red(Posted 2005) [#3]
here : http://www.blitzbasic.com/Community/posts.php?topic=49961


klepto2(Posted 2005) [#4]
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.


Red(Posted 2005) [#5]
I made several tests. I think I found the ADDBLEND


tonyg(Posted 2005) [#6]
How should invertblend be used?


Red(Posted 2005) [#7]
here is an example .
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



Red(Posted 2005) [#8]
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






klepto2(Posted 2005) [#9]
Yes, this should it be, It would be nice to test this .


ImaginaryHuman(Posted 2005) [#10]
Isn't LIGHTBLEND already an add mode?