Summary: | GL.GL_CLIENT_ALL_ATTRIB_BITS should be type int | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Sven Gothel <sgothel> |
Component: | core | Assignee: | Sven Gothel <sgothel> |
Status: | VERIFIED INVALID | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 1 | ||
Hardware: | All | ||
OS: | all | ||
Type: | DEFECT | SCM Refs: | |
Workaround: | --- |
Description
Sven Gothel
2010-03-24 07:51:48 CET
Java's conversion works as demonstrated below: public class PrimitiveIntConversion { public static void main(String [] args) { int i1 = 0xffffffff; // equals -1 int i2 = -1; // equals 0xffffffff long l1 = 0xffffffffL; // equals 4294967295 long l2 = 0xffffffff; // implicit conversion: 0xffffff == -1 -> 0xffffffffffffffffL == -1 System.out.println("i1 : 0x"+Integer.toHexString(i1) + ", "+i1); System.out.println("i2 : 0x"+Integer.toHexString(i2) + ", "+i2); System.out.println("l1 : 0x"+Long.toHexString(l1) + ", "+l1); System.out.println("l2 : 0x"+Long.toHexString(l2) + ", "+l2); l1 = i1; System.out.println("conv1: i1 -> l1 : 0x"+Long.toHexString(l1) + ", "+l1); i1 = (int)l1; System.out.println("conv1: l1 -> i1 : 0x"+Integer.toHexString(i1) + ", "+i1); } } i1 : 0xffffffff, -1 i2 : 0xffffffff, -1 l1 : 0xffffffff, 4294967295 l2 : 0xffffffffffffffff, -1 conv1: i1 -> l1 : 0xffffffffffffffff, -1 conv1: l1 -> i1 : 0xffffffff, -1 +++++++++++ Hence it is reversible and the bit pattern remains, see the conversion of initial l2 and l1 -> i1. For me this would imply that we could change Gluegen's 'long' typing, to use int. However, it is a good hint of GlueGen, that something is 'odd'. so it is definitely not a bug. |