This repository was archived by the owner on Aug 31, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +62
-2
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +62
-2
lines changed
Original file line number Diff line number Diff line change @@ -199,8 +199,6 @@ bool MCTileCacheCoreGraphicsCompositor_BeginLayer(void *p_context, const MCRecta
199
199
t_blend_mode = kCGBlendModeClear ;
200
200
break ;
201
201
case GXblendSrc:
202
- case GXblendSrcOver:
203
- case GXcopy:
204
202
t_blend_mode = kCGBlendModeCopy ;
205
203
break ;
206
204
case GXblendDst:
@@ -232,6 +230,8 @@ bool MCTileCacheCoreGraphicsCompositor_BeginLayer(void *p_context, const MCRecta
232
230
case GXblendPlus:
233
231
t_blend_mode = kCGBlendModePlusLighter ;
234
232
break ;
233
+ case GXblendSrcOver:
234
+ case GXcopy:
235
235
default :
236
236
t_blend_mode = kCGBlendModeNormal ;
237
237
break ;
Original file line number Diff line number Diff line change @@ -555,6 +555,66 @@ 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 GXblendDstOver:
572
+ glBlendFunc (GL_ONE_MINUS_DST_ALPHA, GL_ONE);
573
+ break ;
574
+ case GXblendSrcIn:
575
+ glBlendFunc (GL_DST_ALPHA, GL_ZERO);
576
+ break ;
577
+ case GXblendDstIn:
578
+ glBlendFunc (GL_ZERO, GL_SRC_ALPHA);
579
+ break ;
580
+ case GXblendSrcOut:
581
+ glBlendFunc (GL_ONE_MINUS_DST_ALPHA, GL_ZERO);
582
+ break ;
583
+ case GXblendDstOut:
584
+ glBlendFunc (GL_ZERO, GL_ONE_MINUS_SRC_ALPHA);
585
+ break ;
586
+ case GXblendSrcAtop:
587
+ glBlendFunc (GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
588
+ break ;
589
+ case GXblendDstAtop:
590
+ glBlendFunc (GL_ONE_MINUS_DST_ALPHA, GL_SRC_ALPHA);
591
+ break ;
592
+ case GXblendXor:
593
+ case GXxor:
594
+ glBlendFunc (GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
595
+ break ;
596
+ case GXblendPlus:
597
+ glBlendFunc (GL_ONE, GL_ONE);
598
+ break ;
599
+ case GXblendScreen:
600
+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_COLOR);
601
+ break ;
602
+ case GXblendMultiply:
603
+ case GXblendOverlay:
604
+ case GXblendDarken:
605
+ case GXblendLighten:
606
+ case GXblendDodge:
607
+ case GXblendBurn:
608
+ case GXblendSoftLight:
609
+ case GXblendHardLight:
610
+ case GXblendDifference:
611
+ case GXblendExclusion:
612
+ case GXblendSrcOver:
613
+ case GXcopy:
614
+ default :
615
+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
616
+ break ;
617
+ }
558
618
559
619
self -> current_opacity = p_opacity;
560
620
You can’t perform that action at this time.
0 commit comments