# P3D failing in Python Mode on Mac

**URL:** https://discourse.processing.org/t/p3d-failing-in-python-mode-on-mac/40683
**Category:** Processing.py
**Created:** [January 22, 2023, 9:25pm UTC](https://discourse.processing.org/t/p3d-failing-in-python-mode-on-mac/40683 "2023-01-22T21:25:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jonsantos](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jonsantos](https://discourse.processing.org/u/jonsantos)
#### Post date: [January 22, 2023, 9:25pm UTC](https://discourse.processing.org/t/p3d-failing-in-python-mode-on-mac/40683/1 "2023-01-22T21:25:53Z")

</div>

I have been unable to get the P3D renderer to work as expected while trying to run the Directional example (Examples/Lights/Directional) in Python Mode on my Mac (12.6).

The example does work in Java Mode on my Mac, and it also works in both Java Mode and Python Mode on a friend’s Windows machine.

It does not work on my Mac in Python Mode though after having tried Processing versions 4.1.2, 4.1.1, and 3.5.4.

I’ve trimmed the examples down to these two code samples:

Java Mode:

```auto
void setup() {
  size(500, 500, P3D);
}

void draw() {
  background(0);  
}

```

Python Mode:

```auto
def setup():
    size(500, 500, P3D)
    
def draw():
    background(0)

```

The Java code correctly brings up a window of the correct size and background color.

The Python code does not display anything. I’ve tried specifying `frameRate()`, but still nothing is displayed. There is nothing printed to the console.

This is an Intel Mac with AMD Radeon Pro 5600M 8 GB and Intel UHD Graphics 630 1536 M listed under Graphics.

---

<div class="post-metadata">

### Author: ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)
#### Post date: [January 23, 2023, 5:30am UTC](https://discourse.processing.org/t/p3d-failing-in-python-mode-on-mac/40683/3 "2023-01-23T05:30:19Z")

</div>

Welcome @jonsantos

Use Processing 3.5.4 for Python Mode.

Does it help (with the 3D issue) if you add these lines to the very top of your script?

```python
from java.lang import System
System.setProperty("jogl.disable.openglcore", "false")

```

---

<div class="post-metadata">

### Author: ![rors](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@rors](https://discourse.processing.org/u/rors)
#### Post date: [January 31, 2023, 5:55am UTC](https://discourse.processing.org/t/p3d-failing-in-python-mode-on-mac/40683/4 "2023-01-31T05:55:13Z")

</div>

I am seeing this exact same behavior. Posted it to GitHub here:

> <https://github.com/jdf/processing.py/issues/409>
>
> Running Processing 3.5.4 on MacOS 13.1 Ventura, Intel. Most sketches seem to run… fine, but when trying to run in \`\`\`P3D\`\`\` mode, the sketch window does open and no errors are displayed in the console. I do see the circular Processing icon in the launchpad however and need to force quit it to close it.
> 
> \`\`\`python
> def setup():
> size(800,800,P3D)
> 
> def draw():
> background(255)
> \`\`\`
> 
> Java Control Panel seems to indicate that I'm running Java 1.8.0\_361 (\`\`\`/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java\`\`\`). 
> 
> Adding these lines to the top of the script does not modify the behavior in any discernible way:
> \`\`\`python
> from java.lang import System
> System.setProperty("jogl.disable.openglcore", "false")
> \`\`\`
> 
> Thanks.

Anyone have any idea what could be wrong?

Thanks.

---

<div class="post-metadata">

### Author: ![jonsantos](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jonsantos](https://discourse.processing.org/u/jonsantos)
#### Post date: [February 1, 2023, 1:40am UTC](https://discourse.processing.org/t/p3d-failing-in-python-mode-on-mac/40683/5 "2023-02-01T01:40:04Z")

</div>

Unfortunately, I don’t see any difference in behavior adding those lines to the very top of the script:

```auto
from java.lang import System
System.setProperty("jogl.disable.openglcore", "false")
    
def setup():
    size(500, 500, P3D)
    
def draw():
    background(0)

```
