in my opengl programs i want to convert 3 bytes to a float: i have 3 bytes x,y,and z. x256256 + y*256 + z = some_number
how do i find the 3 bytes if i know some_number? thanx very much
that’s really not OpenGL related
anyway, here’s the solution :
int n = (int) some_number;
int x = n >> (8 + 8);
n = n - (n >> (8 + 8));
int y = n >> 8;
n = n - (n >> 8);
int z = n;
I believe you needn’t have posted it here
[This message has been edited by MickeyMouse (edited 09-07-2002).]