Skip to content
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

P3D and OPENGL Not working #369

Open
Steve557mag-fr opened this issue Nov 9, 2022 · 8 comments
Open

P3D and OPENGL Not working #369

Steve557mag-fr opened this issue Nov 9, 2022 · 8 comments

Comments

@Steve557mag-fr
Copy link

When I try to run my code with P3D or OpenGL, nothing happens. No window appear. Just nothing.
I have tried with Processing 4.0.1 and Processing 3.5.4

my code:

def setup():
    size(200,200,P3D)
    background(50)
    
def setup():
    box(20)

other informations:

  • Windows 10 Pro
  • Intel(R) Core(TM) i5-6500
  • MSI GTX 1050 TI

Maybe I'm missing something in my code ?

@Steve557mag-fr Steve557mag-fr changed the title P3D Not working P3D and OPENGL Not working Nov 9, 2022
@Mistera91
Copy link

Mistera91 commented Nov 20, 2022

I found a workaround, it is to not run your script using Processing editor, but use the command-line processing instead.

Use Processing jar file (can be downloaded at processing.py official website) to run your script and edit it with any code editor.

You will find the processing-py.jar file. Just use command line java 1.8.0 to run it : java -jar processing-py.jar <.pyde script>

This is a dirty workaround but I could not find any better solution

! Important edit !

I forgot the most important part : you need _JAVA_OPTIONS='-Djogl.disable.openglcore=false' (no idea how you pass those options on windows, but for linux you just do export _JAVA_OPTIONS='-Djogl.disable.openglcore=false')

! Re-Edit !

I'm not sure the java option is useful (it throws a X11 error so I'm not sure if you will encounter it with windows), try without it first, then if it doesn't work, try with it

@tabreturn
Copy link

You could also add these lines to the top of your sketch --

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

source: processing/processing#6061

@rors
Copy link

rors commented Jan 25, 2023

Hello. I am also seeing this error. Same code snippet as above does not run in Python mode with P3D or OPENGL.

Processing 3.5.4
MacBook Air, 1.1 GHz Quad-Core Intel Core i5

Thanks

@Mistera91
Copy link

Mistera91 commented Jan 25, 2023 via email

@rors
Copy link

rors commented Jan 25, 2023

py5 looks cool but does not solve my problem.

I am trying to get Processing to work in Python mode. I am currently running Processing in version 3.5.4. I would be happy to use Processing 4 instead but my understanding is that it is not compatible with Python mode.

@Mistera91
Copy link

it is not compatible with Python mode.

It is

@rors
Copy link

rors commented Jan 26, 2023

Could you explain or point me to a reference that explains how to use Processing 4 in Python mode? It doesn't seem to work for me at all.

For me (MacOS, Intel, Ventura 13.1) I download Processing 4, open the application, try a one-line sketch (size(400,400)) in Python mode and get this error:

java.lang.NullPointerException
  at jycessing.Runner.runSketchBlocking(Unknown Source)
  at jycessing.mode.run.SketchRunner.lambda$startSketch$3(Unknown Source)
  at java.base/java.lang.Thread.run(Thread.java:833)

I cannot even click the console "Copy" button to copy the error message. (Both this sketch and copying the console work in Java mode.)

@Mistera91
Copy link

Mistera91 commented Jan 26, 2023

Could you explain or point me to a reference that explains how to use Processing 4 in Python mode? It doesn't seem to work for me at all.

Well, for me, the exact same one-liner works. I am running processing 4.0.1 on linux, so I don't know your issue sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants