mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Flushing immediate mode geometry when blend mode changes. shape() calls also flushes any remaining geometry.
This commit is contained in:
@@ -23,15 +23,16 @@ void draw() {
|
||||
|
||||
tint(255, 255);
|
||||
image(pic1, 0, 0, pic1.width, pic1.height);
|
||||
|
||||
screenBlend(selMode);
|
||||
|
||||
blendMode(selMode);
|
||||
tint(255, picAlpha);
|
||||
image(pic2, 0, 0, pic2.width, pic2.height);
|
||||
|
||||
screenBlend(REPLACE);
|
||||
blendMode(REPLACE);
|
||||
fill(200, 50, 50);
|
||||
rect(0, height - 50, map(picAlpha, 0, 255, 0, width), 50);
|
||||
fill(255);
|
||||
fill(255);
|
||||
|
||||
text("Selected blend mode: " + name + ". Click to move to next", 10, pic1.height + 30);
|
||||
text("Drag this bar to change alpha of image", 10, height - 18);
|
||||
}
|
||||
@@ -76,4 +77,4 @@ void mouseDragged() {
|
||||
if (height - 50 < mouseY) {
|
||||
picAlpha = int(map(mouseX, 0, width, 0, 255));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user