Sketch compiles but shows a blank window when resolution is too high

edited February 2014 in Using Processing

Hi, I'm using the latest version of Processing on OS X 10.7. Usually I'll run a sketch at 800 x 800 while I am writing it and then make it 1600 x 1600 for a higher res save of the final image. Increasingly I'm finding even on simple sketches that when I make them larger than my screen (1280 x 720), it just shows me a blank/grey window. Sometimes restarting Processing fixes it for a few runs and then the problem returns, and it seems a bit random in how long it takes to start happening, and how small the sketch has to be before it actually runs again. (sometimes a 1400 square is fine, sometimes 800). No messages/errors appear in the console.

This is the kind of script I'm running:

int space = 100;
int fileNum = 8;
int frame = 0;

void setup(){
  size(1600,1600);
  background(10);
}

void draw(){
  strokeWeight(1);
  noFill();
  smooth(4);
  stroke(255);

  translate(width/2, height/2);

  int size = frame % space;
  for(int i = 0; i < 100; i++){

    beginShape();
    vertex(-1*size, 1*size);
    vertex(1*size, 1*size);
    vertex(-1*i*size, -1*size);
    vertex(1*size, -1*size);
    endShape();

    beginShape(LINES);
    vertex(-1*size, 1*size);
    vertex(-1*size, -1*size);
    vertex(1*size, 1*size);
    vertex(1*size, -1*size);
    endShape();


    size += space;

  }
  frame += 1;
}

Any ideas? Thanks

Answers

  • "for a higher res save of the final image"
    Not a solution for your problem, but if the goal is just to save an image, usually people just create a PImage of the right resolution, draw upon it and save it. Thus, no problem of display driver or hardware.

Sign In or Register to comment.