Add [Serializable] attribute to structures in OpenTK.Math [resolved]
Posted Sunday, 2 March, 2008 - 20:30 by georgwaechter in
Hello,
i would suggest to add the [Serializable] attribute to structures like Matrix4x4 or Vector3. So you are able to serialize the data to a file.
I currently need this, because i have a file format for storing vector special graphics, internally i want to use structures out of the OpenTK.Math namespace.
What do you think?
regards
georg wächter




Comments
Mar 02
20:41:00Re: add [Serializable] attribute to structures in OpenTK.Math
posted by the FiddlerAlready done this for the double-precision structures in 0.9.1 is the
[Serializable]attribute. Will add to the rest before release.[edit: spelling]
Mar 03
20:28:00Re: add [Serializable] attribute to structures in OpenTK.Math
posted by georgwaechtercool :)
Jul 09
16:54:14Re: add [Serializable] attribute to structures in OpenTK.Math
posted by oyvindraHi, I don't think Vector3 is marked as serializable in 0.9.1, and it really should be :)
I've just started to use OpenTK, and I must say it works really well so far, except for the abovementioned, and how the OpenGLControl looks while editing in VS2005
Jul 09
16:57:24Re: add [Serializable] attribute to structures in OpenTK.Math
posted by the FiddlerHow does GLControl look in the designer? There used to be some issues with redrawing, but these were fixed at some point. Can you please start a new topic, maybe with a screenshot? (I no longer have VS2005).
Jul 09
21:38:20Re: add [Serializable] attribute to structures in OpenTK.Math
posted by oyvindraAny info on [Serializable] for Vector3;
or how can I find / use vector3d (which is set as [Serializable] from OpenTK 0.9.1 (can I?), and are there any large differences between vector3 and vector3d?
Jul 10
14:05:04Re: add [Serializable] attribute to structures in OpenTK.Math
posted by the FiddlerThe difference between Vector3 and Vector3d is that the former is using floats; the latter doubles. The double-precision structures are not yet available (that's not that big of a problem, since GL2 doesn't support double precision primitives).
I've just added the serializable attribute to the Vector*, Matrix4 and Quaternion structs in SVN, along with operator== implementations. To use the updated code, checkout from SVN and compile OpenTK (head to the Build/ directory and type "build vs" from a command prompt to create a VS2005 solution).