@@ -555,6 +555,68 @@ bool MCTileCacheOpenGLCompositor_BeginLayer(void *p_context, const MCRectangle&
555
555
self -> is_blending = true ;
556
556
glEnable (GL_BLEND);
557
557
}
558
+
559
+ switch (p_ink)
560
+ {
561
+ case GXblendClear:
562
+ case GXclear:
563
+ glBlendFunc (GL_ZERO, GL_ONE_MINUS_SRC_ALPHA);
564
+ break ;
565
+ case GXblendSrc:
566
+ glBlendFunc (GL_ONE, GL_ZERO);
567
+ break ;
568
+ case GXblendDst:
569
+ glBlendFunc (GL_ZERO, GL_ONE);
570
+ break ;
571
+ case GXblendSrcOver:
572
+ case GXcopy:
573
+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
574
+ break ;
575
+ case GXblendDstOver:
576
+ glBlendFunc (GL_ONE_MINUS_DST_ALPHA, GL_ONE);
577
+ break ;
578
+ case GXblendSrcIn:
579
+ glBlendFunc (GL_DST_ALPHA, GL_ZERO);
580
+ break ;
581
+ case GXblendDstIn:
582
+ glBlendFunc (GL_ZERO, GL_SRC_ALPHA);
583
+ break ;
584
+ case GXblendSrcOut:
585
+ glBlendFunc (GL_ONE_MINUS_DST_ALPHA, GL_ZERO);
586
+ break ;
587
+ case GXblendDstOut:
588
+ glBlendFunc (GL_ZERO, GL_ONE_MINUS_SRC_ALPHA);
589
+ break ;
590
+ case GXblendSrcAtop:
591
+ glBlendFunc (GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
592
+ break ;
593
+ case GXblendDstAtop:
594
+ glBlendFunc (GL_ONE_MINUS_DST_ALPHA, GL_SRC_ALPHA);
595
+ break ;
596
+ case GXblendXor:
597
+ case GXxor:
598
+ glBlendFunc (GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
599
+ break ;
600
+ case GXblendPlus:
601
+ glBlendFunc (GL_ONE, GL_ONE);
602
+ break ;
603
+ case GXblendScreen:
604
+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_COLOR);
605
+ break ;
606
+ case GXblendMultiply:
607
+ case GXblendOverlay:
608
+ case GXblendDarken:
609
+ case GXblendLighten:
610
+ case GXblendDodge:
611
+ case GXblendBurn:
612
+ case GXblendSoftLight:
613
+ case GXblendHardLight:
614
+ case GXblendDifference:
615
+ case GXblendExclusion:
616
+ default :
617
+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
618
+ break ;
619
+ }
558
620
559
621
self -> current_opacity = p_opacity;
560
622
0 commit comments