Run Window can't be moved

Hi, when I click ‘Run’ the window gets locked to my screen and I can’t move it.

Maybe a bug, it’s not happened before today.

Code (D.Shiffman’s Perlin Terrain)

Apologies for code formatting - I tried to rectify in an edit but can’t seem to do so

int scl = 20; // scale - what to divide the board up into
int rows, cols = 20; // rows and columsn
int w = 1200;
int h = 900;

float [] [] terrain;

void setup() {
size(600, 600, P3D); // operate in 3D

cols = w/scl; // link to size
rows = h/scl; // link to size
terrain = new float [cols] [rows];
for (int y = 0; y<rows; y++) {
for (int x = 0; x<cols; x++) {
terrain [x][y] = random(-10,10); // assign random values to terrain z values
}
}
}

void draw () {
background(0);
stroke(255);
noFill();

translate(width/2, height/2); // centre the grid
rotateX(PI/3); // rotate the plane
translate(-w/2, -h/2); // center the rotation

for (int y = 0; y<rows -1; y++) {
beginShape(TRIANGLE_STRIP); // create shape across y first…
for (int x = 0; x<cols; x++) {
vertex(xscl, yscl, terrain [x][y]); // 20 x vertexs, 20 y vertexs
vertex(x*scl, (y+1)*scl, terrain[x][y+1]);// 20 x vertexs, 20 y+1 vertexs
}
endShape();
}
}

Do you experience the same problem running other sketches? You can also try any of the provided examples that come with Processing. Some notes about formatting below.

Kf

Please format your code :blush:

It consist on these two steps:

  1. In your code editor (PDE, VS code, Eclipse, etc) ensure you execute the beautifier function. This function automatically indents your code. Auto-indenting makes your code easier to read and helps catching bugs due to mismatch parenthesis, for instance. In the PDE, you use the key combination: ctrl+t
  2. You copy and paste your code in the forum. Then you select the code and you hit the formatting button aka. the button with this symbol: </>

That’s it! Please notice you do not create a new post in case you need to format something you already posted. You can edit your post, copy the code to the PDE, indent the code properly there and then past it back here, format the code and >> save << the edits.

Extra info:

Formatting your code makes everybody’s life easier, your code looks much better plus it ensures your code integrity is not affected by the forum’s formatting (Do you know the forum processes markup code?) Please visit the sticky posts or the FAQ section/post to learn about this, other advantages and super powers you can get in this brand new forum.

Have you had issues using P3D before?

And what OS are you using?

This is the first time using P3D

Just to confirm, if you run one of the provided Processing examples using the standard renderer instead of P3D, does it run ok? Running this test verifies that your basic Processing core works. Then, once could conclude the problem is more likely due to the graphics card, or its driver/software.

Please don’t forget to format your code.

Kf

I would also do what @kfrajer mentioned, check if you can run any type of P3D at all, cause the P3D could be causing the issues?

Feel free to keep us updated!

EnhancedLoop7