- Home /
Replace or wrap or port GDI+ source code in Unity
Hi All,
I have this old Windows application with a lot of source code written in mostly C and a bit of C++. It draws in 2D many shapes and graphics using GDI+ library.
I need to draw the same shapes and graphics inside Unity (on a "virtual screen" that would be placed in a scene).
As the original source code is huge, very complicate, and shared with the original application that has still its own life, I would like to use as much as possible the same code on both.
My source code only uses the following primitives from GDI+ (Graphics) :
FillPolygon
DrawLines
SetClip
plus a few init procedures like SetCompositingMode ...
Everything else is pure C (except the part that calls the GDI functions that are c++)
Is there a way to Wrap or replace those functions by native Unity functions that would be called from C code or is there a way to call directly those function from Unity ?
Of course, I understand that I will have to precise on which 3D plane inside unity I want the drawing to be done.
Thanks a lot for your help,
Have a nice day
Antoine
Your answer
Follow this Question
Related Questions
How to create a 2D line between a Game Object and the mouse? 0 Answers
Draw a line via script and make a solid with it.. 1 Answer
How can I draw an array of data (640x480) very fast ? 5 Answers
How to draw a line between two points in Unity 2 Answers
(2D) How to make kinematic rigidbodies rotate without clipping? 1 Answer