Hello everyone,
I maintain a little 3D-editing-tool written in Delphi that desperately needs a rewrite. It has a GUI with an OpenGL-Frame and some functions to handle geometric data (triangles, maybe nurbs someday, some lines, ...). Now I would like to have a good concept on how to make a clear separation between the GUI elements and the "backend" which handles the data. I wouldn't write into this forum if I didn't prefer Rust as the language for the backend . My idea was to provide the backend as a dll (I work on windows), which I can tell stuff like "start a new project", "Load data from file X", "Select the surface X", "Move the selected surface to point X", "Draw all data to the current viewport", ... . The GUI would be written in C#, Qt or Delphi and just send the requests to the backend.
Now I very much lack experience in this area but i am eager to learn. How would a good basic layout of the backend look like?
Thanks for reading and your help!
Edit: To elaborate a bit more: I know how to write functions in language X and use them via a dll in language Y. The thing that bothers me is how to accomplish the persistency of the geometry data inside my backend. I have a feeling that global variables are not a good way, at least not a very rusty way to achieve it. But maybe I am wrong... how would you do it?