From b3d70ca1503445a83761699491ba660b290331d5 Mon Sep 17 00:00:00 2001 From: benfry Date: Thu, 23 Mar 2006 16:18:28 +0000 Subject: [PATCH] fix endian check to avoid security exception --- opengl/PGraphicsGL.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/opengl/PGraphicsGL.java b/opengl/PGraphicsGL.java index f576e2edf..b141c2a7e 100644 --- a/opengl/PGraphicsGL.java +++ b/opengl/PGraphicsGL.java @@ -85,19 +85,11 @@ public class PGraphicsGL extends PGraphics3 { protected IntBuffer pixelBuffer; /** - * Used in temporary calcuulations to avoid - * reallocating during heavy renders - */ - //protected float[] calcColor = new float[4]; - - /** - * 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. + * Set to true if the host system is big endian (PowerPC, MIPS, SPARC), + * false if little endian (x86 Intel for Mac or PC). */ static public boolean BIG_ENDIAN = - System.getProperty("sun.cpu.endian").equals("big"); + ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN; /**