New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blendMode() is not preserved between setup() and draw() #4019

Closed
clayheaton opened this Issue Oct 18, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@clayheaton

clayheaton commented Oct 18, 2015

blendMode() does not work when included in setup(), only when used in draw(). There is no warning to not use it in setup().

This does not work:

void setup() {
  size(550, 500);
  noStroke(); 
  blendMode(ADD);
}

void draw() {
  background(0);
  fill(255,0,0);
  ellipse(200,200,250,250);

  fill(0,255,0);
  ellipse(width-200,200,250,250);

  fill(0,0,255);
  ellipse(width/2,height-175,250,250);
}

This works as expected:

void setup() {
  size(550, 500);
  noStroke(); 
}

void draw() {
  blendMode(ADD);
  background(0);
  fill(255,0,0);
  ellipse(200,200,250,250);

  fill(0,255,0);
  ellipse(width-200,200,250,250);

  fill(0,0,255);
  ellipse(width/2,height-175,250,250);
}

@JakubValtar JakubValtar changed the title from blendMode() does not work in setup(), only in draw() to blendMode() is not preserved between setup() and draw() Oct 22, 2015

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Apr 18, 2016

Member

Fixed for 3.0.3 #4341

Member

benfry commented Apr 18, 2016

Fixed for 3.0.3 #4341

@benfry benfry closed this Apr 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment