Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

How to read dec3n values from a file in littleend and write to bigendian


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 jor1980   Members   -  Reputation: 124

Like
0Likes
Like

Posted 20 March 2013 - 09:53 AM

Hi, i am reading data of a mesh from a file that uses for some vertex data DEC3N, and i need to write those vaules to a new file in bigendian.

I was reading the data with a binaryreader reading it as int32 but i think that this is not right.

 

How could i do it?



#2 Yourself   Crossbones+   -  Reputation: 458

Like
0Likes
Like

Posted 20 March 2013 - 10:14 AM

Read the values as uint32 (unsinged), do the endian conversion if needed, unpack the DEC3N (see this topic) and write the floating point values.



#3 jor1980   Members   -  Reputation: 124

Like
0Likes
Like

Posted 20 March 2013 - 01:35 PM

Hi, thank´s for your help, what i need exactly is read from a file in little endian data in DEC3N format and the write those data into another file inDEC3N in bigendian, so do you think i could read as uint32 and then write this uint32 in bigendian?






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS