New-ZenGL icon indicating copy to clipboard operation
New-ZenGL copied to clipboard

[Feature] >> Add zgl_headers

Open turric4n opened this issue 4 years ago • 6 comments

Hi,

Old versions of ZenGL has header pas file to generate dynamic library DLL/SO.

I like to dynamic link ZenGL instead static.

It would be nice to have bindings again.

turric4n avatar Feb 15 '21 21:02 turric4n

Hello! Yes, i will return this opportunity. But after modifications with the input field and reworking the code for android.

There is simply not enough time for everything and I want everything to work more or less stably.

Seenkao avatar Feb 16 '21 11:02 Seenkao

I could work on the headers if you want. I have experience with ZenGL

turric4n avatar Feb 16 '21 15:02 turric4n

I will look at your option with interest! And I will add it, most likely with additions, if something is missing. I will be grateful! Unfortunately, I can't promise anything more. The project is based on enthusiasm.

You can use the old file from version 3.12, and edit it, considering all changes.

Seenkao avatar Feb 17 '21 13:02 Seenkao

The difficulty will not be in collecting the zgl_headers file back, the difficulty will be in the fact that the ZenGL library needs to be redone for this file again. This file should build the entire library, and some parts of the library are mutually exclusive.

So we must avoid these moments. That will not be easy (knowing what and where I ruled) even for me.

Seenkao avatar Feb 17 '21 13:02 Seenkao

Yep, I compiled a version of the dynamic library using your code and modifications made by me. I got it working but some procedures/functions are not set like past (zgl_screen things for example). As I saw, your code improves ZenGL. IMHO The best way to done things well is to remade all the bindings and remove old code. I encourage you to continue!

turric4n avatar Feb 17 '21 13:02 turric4n

I have not compared old files with new ones. Initially, the main code was edited. Which, most likely, immediately affected the zgl_headers. Functions and startup procedures have been edited. And the zgl_headers file can be edited according to the included demos.

Defines have been introduced in ZenGL that separate the creation of a regular window and the creation of a context in an already created window (LCL). And, when creating DLL / SO-libraries, they must be combined (exclude the use of these defines), or make versions of the libraries, for LCL and non-LCL.

It is also necessary to make separate SO-libraries for android and in the future for iOS.

Therefore, I believe that it is not easy to solve everything. And it's probably easier to make "many" different libraries for different platforms (both LCL and non-LCL flavors). In order to exclude code that will not be used.

And redoing everything ... it means just starting from scratch, using only the knowledge of ZenGL. And this is most likely a new library. )))

Seenkao avatar Feb 17 '21 14:02 Seenkao