File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2879,13 +2879,21 @@ void PApplet::blendMode(int mode) {
28792879 // Reset equation first (SUBTRACT changes it)
28802880 glBlendEquation (GL_FUNC_ADD );
28812881 switch (mode) {
2882+ case BLEND : glBlendFunc (GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA ); break ;
28822883 case ADD : glBlendFunc (GL_SRC_ALPHA , GL_ONE ); break ;
28832884 case MULTIPLY : glBlendFunc (GL_DST_COLOR , GL_ZERO ); break ;
28842885 case SCREEN : glBlendFunc (GL_ONE , GL_ONE_MINUS_SRC_COLOR ); break ;
2886+ case DARKEST : glBlendFunc (GL_ONE , GL_ONE ); glBlendEquation (GL_MIN ); break ;
2887+ case LIGHTEST : glBlendFunc (GL_ONE , GL_ONE ); glBlendEquation (GL_MAX ); break ;
2888+ case DIFFERENCE :
2889+ glBlendEquation (GL_FUNC_SUBTRACT );
2890+ glBlendFunc (GL_ONE , GL_ONE );
2891+ break ;
28852892 case SUBTRACT :
28862893 glBlendEquation (GL_FUNC_REVERSE_SUBTRACT );
28872894 glBlendFunc (GL_SRC_ALPHA , GL_ONE );
28882895 break ;
2896+ case REPLACE : glBlendFunc (GL_ONE , GL_ZERO ); break ;
28892897 default : glBlendFunc (GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA ); break ;
28902898 }
28912899}
You can’t perform that action at this time.
0 commit comments