Add internal 'KeepDestAlpha' BlendType (for use in WindowVX)
This commit is contained in:
		
							parent
							
								
									d95e90db34
								
							
						
					
					
						commit
						d654fb7dd6
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -31,6 +31,8 @@ struct SDL_Color;
 | 
			
		|||
 | 
			
		||||
enum BlendType
 | 
			
		||||
{
 | 
			
		||||
	BlendKeepDestAlpha = -1,
 | 
			
		||||
 | 
			
		||||
	BlendNormal = 0,
 | 
			
		||||
	BlendAddition = 1,
 | 
			
		||||
	BlendSubstraction = 2
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,6 +64,12 @@ void GLBlendMode::apply(const BlendType &value)
 | 
			
		|||
{
 | 
			
		||||
	switch (value)
 | 
			
		||||
	{
 | 
			
		||||
	case BlendKeepDestAlpha :
 | 
			
		||||
		gl.BlendEquation(GL_FUNC_ADD);
 | 
			
		||||
		gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
 | 
			
		||||
		                     GL_ZERO,      GL_ONE);
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
	case BlendNormal :
 | 
			
		||||
		gl.BlendEquation(GL_FUNC_ADD);
 | 
			
		||||
		gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue