How to save mesh results got in opengl to New York University file format (.m) ?

Hello everybody,

I have written a opengl programm to read 3d object and construct hexahedral mesh for it. I can see the mesh. But, I would like to know how can i save the mesh in to Newyork University Mesh File format (.m). Please help me.

You need to get the .M specification from the university and convert the data you loaded into OpenGL into that format.