[Solved] P3D Fullscreen on Windows 10

Hi guys!

Well, I am trying to load a sketch from Eclipse IDE with 3D renderer (P3D) in fullscreen mode. I override the "settings()" method, but the sketch just does not load (processing screen does not appear). I've also tried to get more memory to the JVM, with -Xmx4096 -Xms1024, with no success. I could not find a similar issue browsing Google (at least, none with an answer that made my version work). I dont know why, but my guess is that it might be some problem with the libraries I am using (jogl and/or gluegen) or a Windows 10 issue.

I've been debugging the code to understand why it does not respond. It seems that the problem is at line 10295 of PApplet.java, inside PApplet.initSurface() method (processing version 3.0.b.3):

10295. surface.initFrame(this); //, backgroundColor, displayNum, fullScreen, spanDisplays);

Calls inside this method end up at PSurfaceJOGL.java, line 408:

408. NewtFactory.setWindowIcons(new ClassResources(PApplet.class, iconImages));

All filenames in String array "iconImages" are existing images in the package. "PApplet.class" returns an actual instance, as well as "new ClassResources(PApplet.class, iconImages)" call. So, it seems the problem happens at "NewtFactory.setWindowIcons(...)" method, which I could not get in as I don't have the source code.

When I get to this line, the method call just does not return, as if it had got into an endless loop. No error messages, no interruption of the Java thread, just does not return.

My testing code is bellow, I run it through context menu "Run as... > Java Application" or "Debug as... > Java Application".

        import processing.core.PApplet;

        public class PerformanceManagerTest extends PApplet {

            public PerformanceManagerTest() {
                super();
            }

            @Override
            public void setup() {
                super.setup();
                super.frameRate(30);
                super.background(0xFFFF0000);
            }

            @Override
            public void settings() {
                super.fullScreen(P3D);
            }

            @Override
            public void draw() {
                super.draw();
                super.fill(0xFF00FF33);
                super.sphere(200);
            }

            @Override
            public void keyPressed() {
                System.out.println("Key Pressed: " + super.key + ", " + super.keyCode);
            }

            public static void main(String[] args) {
                //Default mode, no reference to sketch kept (but I need a reference to sketch)
                //PApplet.main(PerformanceManagerTest.class.getName()); 
                PerformanceManagerTest sketch = new PerformanceManagerTest();
                PApplet.runSketch(new String[] {PerformanceManagerTest.class.getName()}, sketch);
            }
        }

My environment is:

Windows 10 64bit, i7, 12GB

Eclipse Kepler Service Release 2 (build id: 20140224-0627)

Java SE 1.7

processing-3.0.b.3-core.jar

I tried to add all gluegen and jogl libs to the project, although I think I only need the (*) ones. Added to Java build path into Eclipse project:

gluegen-rt-natives-linux-amd64.jar

gluegen-rt-natives-linux-armv6hf.jar

gluegen-rt-natives-linux-i586.jar

gluegen-rt-natives-macosx-universal.jar

gluegen-rt-natives-windows-amd64.jar (*)

gluegen-rt-natives-windows-i586.jar

gluegen-rt.jar (*)

jogl-all-natives-linux-amd64.jar

jogl-all-natives-linux-armv6hj.jar

jogl-all-natives-linux-i586.jar

jogl-all-natives-macosx-universal.jar

jogl-all-natives-windows-amd64.jar (*)

jogl-all-natives-wndows-i586.jar

jogl-all.jar (*)

So, any tips to make it run properly in fullscreen with P3D?

Thank you in advance.

Answers

  • Answer ✓

    Hi guys! After writing the question I kept browsing, looking for things not related to Processing itself (as my guess was Windows or libs).

    Just found out: I was using a 32bit JRE, when I needed a 64bit JRE.

    Cant' believe I lost so much hours with such a stupid thing. =/

    Hope this helps others in similar situations, at least.

Sign In or Register to comment.