Bug 309 : OpenGL applets impossible because of CPU endian check
Last modified: 2006-03-23 08:17



Assigned To:

Attachment Type Created Size Actions

Description:   Opened: 2006-03-23 03:38
As commented in PGraphicsGL, line 99 causes a security problem, so OpenGL
applets still need to be signed to work.
Without the line, I think it'd be possible to create an OpenGL applet
without requiring any jar signing by a user.

Relevant chunk of PGraphicsGL in case line numbers have changed:

* true if the host system is big endian (PowerPC, MIPS, SPARC),
* false if little endian (x86 Intel). This throws a security
* exception in applets, though applets will need to be signed
* for JOGL anyways. This is a bad solution, however.
static public boolean BIG_ENDIAN =
Additional Comment #1 From JohnG 2006-03-23 04:30
Just updated my copy of the source to 110 altered the line to force it to
false (as a test) and I can use the resultant sketch jar file in an OpenGL
applet with the sun signed jogl jars with no alterations necessary. So this
line is the only thing stopping direct building of OpenGL applets.

I've no idea how you'd go about finding the endian-ness in a safe manner
Additional Comment #2 From fry 2006-03-23 04:35
yeah, it's safe to assume that if i've made a mention of it in the code, i'm aware of the bug ;)

the proper method is to use the ByteOrder class in 1.4, i'm looking into that shortly.
Additional Comment #3 From JohnG 2006-03-23 04:59
Heh fair enough. Thought it was worth highlighting in case it was fairly
old and fogotten.

As you say, ByteOrder does appear to be the key

static public boolean BIG_ENDIAN =

appears to work, though as you say, causes PGraphicsGL to be 1.4 dependant.
(unless it already is for JOGL...)

Additional Comment #4 From fry 2006-03-23 05:19
nah, it's up at the top of the core/todo.txt, which is where all the stuff
i'm thinking about most actively is usually located. ;)

and jogl already requires 1.4, so we're all set.
Additional Comment #5 From fry 2006-03-23 08:17
fixed for 0111.