🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

importing lwo in opengl

Started by
1 comment, last by chris82 24 years ago
i want to make a function that can read the points and surface from a .lwo(lightwave) but i don''t know what is a IEEE floating point number. who can help me? the example are : 00000000 3f800000 00000000 0.0, 1.0, 0.0 point 0 40200000 3f800000 00000000 2.5, 1.0, 0.0 point 1 40200000 bf800000 00000000 2.5, -1.0, 0.0 point 2 00000000 bf800000 00000000 0.0, -1.0, 0.0 point 3 c0000000 00000000 00000000 -2.0, 0.0, 0.0 point 4 each 12byte is a point
Advertisement
Just use fread() to read them into a float, and then swap the byte order (depending on your platform). I have a quick n dirty LWO loader if you want some pre-written, uncommented, source code
If a man is talking in the forest, and there is no woman there to hear him, is he still wrong?
I HAVE AN ATHLON AND I''M UNDER WIN2000 AND WIN98.
I THINK I''LL WORKS UNDER WIN2000.
IF I HAVE UNDERSTAND WELL I HAVE ONLY TO READ THE FILE IN A FLOAT AND BYTESWAP IT AND THE INFO WILL BE OK.
FOR THE PROGRAM IS OK BUT I WOULD UNDERSTAND HOW TO READ(WITH MY MIND)FLOAT NUMBER IN HEX OR BINARY.
CAN YOU EXPLAIN ME THE TECHNIQUE?
AND CAN YOU SEND ME THE SOURCE FOR VIEWING IT

This topic is closed to new replies.

Advertisement