I'm a little lost when trying to compare float coordinates to int coordinates
I use this method to create a Vertex Buffer and of course I modify it to return a floatBuffer or intBuffer base on the type of array coords is (int[] or float[]).
ByteBuffer tbb = ByteBuffer.allocateDirect(coords.length * 4);
tbb.order(ByteOrder.nativeOrder());
returnBuffer = tbb.asIntBuffer();
returnBuffer.put(coords);
returnBuffer.position(0);
gl.glVertexPointer(3, GL10.GL_FIXED, 0, returnBuffer);
I understand the difference between ints and floats on a bitwise level.
1f = int 65536;
.5f = int 32768;
I don't understand if that is true how come the conversion to float is not simple?
say i have the following which properly renders a plane in the center of the screen:
int ONE = 65536;
int coords = int[]{
-ONE, -ONE ,0,
ONE,-ONE ,0,
-ONE ,ONE ,0
ONE ,ONE ,0}
when i convert to float
float ONE = 1.0f;
float coords = float[]{
-ONE, -ONE ,0,
ONE,-ONE ,0,
-ONE ,ONE ,0
ONE ,ONE ,0}
nothing appears...
Am I misunderstanding something? Any pointers would be useful.
Thanks

