Update glstate.cpp
Fixes the GL blend formula for Subtractive blending
This commit is contained in:
		
							parent
							
								
									f138731f7c
								
							
						
					
					
						commit
						0febebe482
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -84,10 +84,9 @@ void GLBlendMode::apply(const BlendType &value)
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	case BlendSubstraction :
 | 
						case BlendSubstraction :
 | 
				
			||||||
		// FIXME Alpha calculation is untested
 | 
					 | 
				
			||||||
		gl.BlendEquation(GL_FUNC_REVERSE_SUBTRACT);
 | 
							gl.BlendEquation(GL_FUNC_REVERSE_SUBTRACT);
 | 
				
			||||||
		gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE,
 | 
							gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE,
 | 
				
			||||||
		                     GL_ONE,       GL_ONE);
 | 
							                     GL_ZERO,      GL_ONE);
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue