Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (517)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (578)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Are LWJGL applets supposed to work on Snow Leopard using Firefox?  (Read 2861 times)
0 Members and 1 Guest are viewing this topic.
Offline arielm

Junior Duke




which way to the station?


« Posted 2010-08-01 14:32:31 »

I wanted to give LWJGL a try, skipping directly to applets (webstart is not an option anymore for now...)

I'm using the basic Gears demo as a test ( http://lwjgl.org/applet/ )

So far, it works fine on 3 different Windows machines (using FF and Explorer...)

Unfortunately, it's another story on my MacBook Pro (Snow Leopard 10.6.4; Java 1.6.0_20; NVIDIA GeForce GT 330M):

- It does work, using Safari 5.0

- It does not work, using FF 3.6.8, with the following log:

MRJ Plugin for Mac OS X v1.0.1
[starting up Java Applet Security @ Sun Aug 01 16:52:13 IDT 2010]
Sun Aug 01 16:52:14 IDT 2010 JEP creating applet org.lwjgl.util.applet.AppletLoader (http://lwjgl.org/applet/)
org.lwjgl.LWJGLException: Could not create pixel format
   at org.lwjgl.opengl.MacOSXPeerInfo.nChoosePixelFormat(Native Method)
   at org.lwjgl.opengl.MacOSXPeerInfo.choosePixelFormat(MacOSXPeerInfo.java:55)
   at org.lwjgl.opengl.MacOSXPeerInfo.<init>(MacOSXPeerInfo.java:50)
   at org.lwjgl.opengl.MacOSXCanvasPeerInfo.<init>(MacOSXCanvasPeerInfo.java:49)
   at org.lwjgl.opengl.MacOSXDisplayPeerInfo.<init>(MacOSXDisplayPeerInfo.java:48)
   at org.lwjgl.opengl.MacOSXDisplay.createPeerInfo(MacOSXDisplay.java:246)
   at org.lwjgl.opengl.Display.create(Display.java:853)
   at org.lwjgl.opengl.Display.create(Display.java:783)
   at org.lwjgl.opengl.Display.create(Display.java:764)
   at org.lwjgl.test.applet.GearsApplet$1.run(GearsApplet.java:54)
Exception in thread "Thread-9" java.lang.NullPointerException
   at org.lwjgl.opengl.GL11.glClear(GL11.java:585)
   at org.lwjgl.test.applet.GearsApplet.drawLoop(GearsApplet.java:196)
   at org.lwjgl.test.applet.GearsApplet.gameLoop(GearsApplet.java:136)
   at org.lwjgl.test.applet.GearsApplet$1.run(GearsApplet.java:59)

I'm using the "defaults settings" in Java Preferences, since I'm looking for a solution that works "out-of-the-box" for the average user.

Any clues?
Thanks!

Ariel
http://chronotext.org

Ariel Malka | www.chronotext.org
Offline arielm

Junior Duke




which way to the station?


« Reply #1 - Posted 2010-08-02 14:33:15 »

Well, at least it seems to be a problem common to Jogl, namely: the change in "Plugin2 Graphics Rendering" introduced lately by Apple...

However, I still don't get why LWJGL and JOGL are working in Safari but not in FF.

I also don't get why the following is not making any difference on my MacBook pro: going to the Java Prefs and toggling between "Run applets in their own process" and "Run applet within the Browser process", followed by a browser (or even a machine) restart...

Bah, nothing new (Java + OpenGL in the Browser == Quest for the Holy Grail)

Ariel Malka | www.chronotext.org
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2010-08-02 14:36:45 »

FF uses the old plugin1 code, Safari uses plugin2. You can make Safari work by telling it not to run the JVM in a separate process but I'm a bit hazy on the details, which are documented somewhere around these parts.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline arielm

Junior Duke




which way to the station?


« Reply #3 - Posted 2010-08-02 15:18:16 »

Thanks Cas, even though I'm even more confused than before! The thing is that everything works fine, actually in Safari.

The problem is in Firefox: LWJGL and JOGL seem to suffer from the same "can't create pixel format" problem.

And now you say that Safari uses plugin2 while Firefox uses plugin1.
It means that my problem is actually not related to "Apple's recent change in plugin2 architecture".

Doh...
Anyone else affected?

Ariel Malka | www.chronotext.org
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #4 - Posted 2010-08-02 15:40:19 »

Does Minecraft work?

Cas Smiley


Offline kappa
« League of Dukes »

JGO Kernel


Medals: 78
Projects: 15


★★★★★


« Reply #5 - Posted 2010-08-02 16:21:47 »

I'm a bit hazy on the details, which are documented somewhere around these parts.

The thread containing the information about apple breaking JOGL/LWJGL Applets can be found here.

arielm: From your description it does not sound like its related to the above problem, since that only effects plugin2 and not plugin1.

Bah, nothing new (Java + OpenGL in the Browser == Quest for the Holy Grail)

Sadly Mac is the weakest platform when it comes to LWJGL Applets, where as Windows and Linux have very good compatibility which is IMO equivalent to running a standalone Native LWJGL Display now.

The problems with LWJGL Applets on mac are is mostly due to the following:

1) LWJGL Dev's mostly lack macs so LWJGL Applets are less well tested.
2) Apples Stupid Policy of not sharing their own java plugin implementation, resulting in browsers like FF having to rely on a crappy 3rd party implementation which is very buggy.
3) Apple recent move with plugin2 highlighted in the above linked thread.
4) Chrome using plugin2 exclusively and being unable to work with plugin1 (forcing the above issue in the linked thread).

Now I'm not sure why its failing for you on firefox, but could you try see if Final Kapster works for you. If so I might have a solution for you.
Offline arielm

Junior Duke




which way to the station?


« Reply #6 - Posted 2010-08-02 16:24:23 »

[IN RESPONSE TO CAS - RESPONSE TO KAPTA COMING SOON...]

Strange!

Minecraft worked in Firefox.
And then, the official LWJGL Gears applet started to work as well...

But then, I made a restart and now, none of them are working (the same old "org.lwjgl.LWJGLException: Could not create pixel format"...)

Actually, this kind of voodoo already happened to me yesterday: suddenly, every LWJGL or Jogl applet is working. But then, after a restart: poof, nothing is working again.

My theory?
From time to time, I go to the Java Prefs and I toggle between "Run applets in their own process" and "Run applet within the Browser process".
Then, I restart the browser, but usually: nothing is changing.
But then, eventually, after a restart or two, my "toggle operation in the prefs" is somehow having some positive effect (however, the positive effect in question is only temporary, until the next restart...)

It could be related to the "created and removed symlinks" mentioned in that same old Apple note.

Sounds bad, especially from the end-user standpoint (I guess I'm not the only MacBook pro owner affected...)

Ariel Malka | www.chronotext.org
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 78
Projects: 15


★★★★★


« Reply #7 - Posted 2010-08-02 16:30:15 »

My theory?
From time to time, I go to the Java Prefs and I toggle between "Run applets in their own process" and "Run applet within the Browser process".

yes this is the workaround highlighted in the thread linked above and fix for mac issue 3) that i pointed out.
Using "Run Applet in their own process" will make browsers use plugin2 (and hence the new renderer that breaks JOGL/LWJGL applets) and setting it off will switch to plugin1.
Offline arielm

Junior Duke




which way to the station?


« Reply #8 - Posted 2010-08-02 16:43:14 »

yes this is the workaround highlighted in the thread linked above and fix for mac issue 3) that i pointed out.
Using "Run Applet in their own process" will make browsers use plugin2 (and hence the new renderer that breaks JOGL/LWJGL applets) and setting it off will switch to plugin1.

I don't know...
Toggling between these 2 options in the Java prefs never had any immediate effect (only some voodoo echo after n restarts...)

Now I'm not sure why its failing for you on firefox, but could you try see if Final Kapster works for you. If so I might have a solution for you.

No, it's not working here in Firefox (same pixel format exception...)

The thread containing the information about apple breaking JOGL/LWJGL Applets can be found here.

arielm: From your description it does not sound like its related to the above problem, since that only effects plugin2 and not plugin1.

Yeah, my "problem" seems to be exactly the contrary of all the mentioned discussions, since everything always works fine in Safari, but almost never in Firefox.

Ariel Malka | www.chronotext.org
Offline princec

JGO Kernel


Medals: 409
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #9 - Posted 2010-08-02 20:10:14 »

Working randomly one time or another : sounds like a race condition to me.

Cas Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

DarkCart (24 views)
2014-10-31 21:44:48

DarkCart (30 views)
2014-10-31 21:43:57

TehJavaDev (40 views)
2014-10-27 03:28:38

TehJavaDev (31 views)
2014-10-27 03:27:51

DarkCart (45 views)
2014-10-26 19:37:11

Luminem (27 views)
2014-10-26 10:17:50

Luminem (31 views)
2014-10-26 10:14:04

theagentd (36 views)
2014-10-25 15:46:29

Longarmx (64 views)
2014-10-17 03:59:02

Norakomi (62 views)
2014-10-16 15:22:06
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!