u/clankill3r

How to draw on top of something in P3D?

How to draw on top of something in P3D?

https://preview.redd.it/aotiefmsewjh1.png?width=1424&format=png&auto=webp&s=0afeec034d032fa837f806e40b1cf48eb3a3e704

```java

void setup() {

size(600, 600, P3D);

}

void draw() {

background(0);

ortho();

hint(DISABLE_DEPTH_TEST);

hint(DISABLE_DEPTH_MASK);

stroke(30);

fill(255, 0, 0);

rect(10, 10, 100, 100);

fill(0, 255, 0);

rect(0, 0, 400, 400);

}

```

How can I draw the second rectangle on top of the first one?
Right now the stroke of the first is coming threw the second rectangle.

Using P2D is not a option, neither is using translate.

reddit.com
u/clankill3r — 3 days ago