floating point & fixed point again
When you use these fixed point numbers do you make sure you divide them back down by 65536 (2^16)? If not, they will remain large values and therefore nothing will be drawn because of out of range values when drawing.
when using fixed point arithmetic, dependant on the accuracy you require, you would multiply the point values up by 2^fractionalbits, when you require them as REAL values you need to divide them down by the same fractionalbits factor. if you are multiplying/dividing/subtracting/adding to these values you also need to make sure they are of the same factor afterwards.
oh and watch out for overflows aswell which is a common problem when using large integers with fixed point arithmetic.
well i've printed some of the loaded numbers (with DBGPRINTF) and i saw that they are pretty big, but i was supposing that they are looking so because they should look so because the 16 bits are 0. well, i will try to play with them a little and see what is happening. thanks.
Quote:Original post by Anonymous Poster
When you use these fixed point numbers do you make sure you divide them back down by 65536 (2^16)? If not, they will remain large values and therefore nothing will be drawn because of out of range values when drawing.
What would be the point of that? OpenGL ES handles the fixed point numbers nativly.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement