Recent

Author Topic: ZenGL +android + MacOS Cocoa (beta)  (Read 7479 times)

Seenkao

  • Sr. Member
  • ****
  • Posts: 446
    • New ZenGL.
ZenGL +android + MacOS Cocoa (beta)
« on: December 21, 2020, 12:55:45 am »
OpenGL!

Доброй ночи! Выкладываю сюда новую версию ZenGL и так же бета версию для MacOS Cocoa.

Goodnight! I'm posting here a new version of ZenGL and also a beta version for MacOS Cocoa.
 :)

ZenGL 3.26/3.27beta (for MacOS Cocoa)

Будте внимательны!!! Ветки перепутаны! (по моей неопытности работы с GitHab).
Часть демо-версий не работает!
12-я считается устаревшей и дорабатывать не буду.
3-я будет доработана позже.
4-ю не желательно использовать для MacOS Cocoa!!!
15-я требует компиляции файлов в папке "yuv2rgba" (да, я не всё умею и не на всё хватает времени) или найти какое-то другое решение.
16-я требует полной переработки, файл идущий с ZenGL для физики, устарел.
17-я в доработке.
18-я. под LCL не буду дорабатывать. Если у вас есть предложения, готов выслушать и будем от этого отталкиваться.

Введена процедура procedure gl_SetCoreGL(mode: Byte);
mode принимает значения CORE_2_1, CORE_3_2,CORE_4_1 - поэтому умельцы, могут включить нужный им OpenGL и работать именно с ним.
устанавливать значение надо до создания окна!!!

необходимо проверить триангуляцию!!! На моём компьютере она не работает.

Google translate:
Be careful!!! The branches are confused! (due to my inexperience in working with GitHab).
Some demos don't work!
The 12th is considered obsolete and I will not modify it.
3rd will be finalized later.
The 4th is not desirable for macOS Cocoa!!!
The 15th requires compiling the files in the "yuv2rgba" folder (yes, I can't do everything and I don't have enough time for everything) or find some other solution.
The 16th requires a complete overhaul, the file that comes with ZenGL for physics is outdated.
17th in revision.
18th. I will not modify it under LCL. If you have any suggestions, I am ready to listen and we will build on this.

Added procedure procedure gl_SetCoreGL (mode: Byte);
mode
takes on the values ​​CORE_2_1, CORE_3_2, CORE_4_1 - therefore, craftsmen can enable the OpenGL they need and work with it.
set the value before creating the window!!!

it is necessary to check the triangulation!!! It doesn't work on my computer.

Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

Seenkao

  • Sr. Member
  • ****
  • Posts: 446
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #1 on: December 21, 2020, 01:21:07 am »
Если вы используете BigSur или CPU не x86_64 то вам надо:
установить библиотеки из brew

If you are using BigSur or a CPU not x86_64 then you need:
install libraries from brew
- zlib
- libzip
- libogg
- vorbis
и если знаете как запустить 15-ю и 16-ю демо-версии, то:
and if you know how to run the 15th and 16th demo versions, then:
- theora
- chipmunk

в файле "zgl_config.cfg" выставить
in the file "zgl_config.cfg" set
Code: Pascal  [Select][+][-]
  1. {$DEFINE MAC_COCOA}
and disable
Code: Pascal  [Select][+][-]
  1. {$IFDEF MAC_COCOA}
  2.   {$DEFINE NO_USE_STATIC_LIBRARY} // -> {.$DEFINE NO_USE_STATIC_LIBRARY}
  3. {$ENDIF}
If all libraries are installed by default, then the demo versions should work.

Если все библиотеки будут установлены по умолчанию, то демо-версии должны заработать.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2763
    • havefunsoft.com
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #2 on: December 21, 2020, 02:51:05 am »
zlib идёт в маке из коробки

с Маком вся тонкость как динамические либы распростронять.
Их обязательно нужно класть в нужную директорию в бандле!

иначе конечных пользователей тоже придёться просить ставить Brew. не камильфо!  :)

Seenkao

  • Sr. Member
  • ****
  • Posts: 446
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #3 on: December 21, 2020, 07:23:03 am »
skalogryz, и вот тут вырисовывается интересная проблема... о которой я даже не задумывался...
Допустим для своего процессора я добавлю эти самые библиотеки, это не проблема.

Но!!! Как обеспечить полную совместимость программы для разных процессоров по свое сути?!
Мне надо об этом заботится? Или всё же приложение скомпилированное на процессоре x86-64 будет работать на процессоре ARM64? Если да, то как мне получить библиотеки для процессора ARM?

Эта проблема, похоже, касается не только MacOS, но и Linux?

Я ни сколько не на Java программирую...

Google translate:
and here an interesting problem looms ... which I did not even think about ...
Suppose I add these same libraries for my processor, this is not a problem.

But!!! How to ensure full compatibility of the program for different processors in essence?!
Do I need to take care of this? Or will an application compiled on an x86-64 processor run on an ARM64 processor? If so, how do I get libraries for the ARM processor?

Does this problem seem to affect not only macOS but Linux as well?

I do not program in Java at all ...

P.S. skalogryz, мы не на русскоязычном форуме.  :)
« Last Edit: December 21, 2020, 08:41:09 pm by Seenkao »
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

Seenkao

  • Sr. Member
  • ****
  • Posts: 446
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #4 on: July 18, 2021, 03:18:14 am »
Всем привет! Обновил версию ZenGL до 3.28.
И с данного момента (так то и раньше уже было) теперь параллельно идёт разработка собственной библиотеки Green Engine. Работает только с ZenGL.

Прошу прощения, но на английском информации мало. Но по ходу разработки добавляю комментарии в код и демонстрационные версии.

GE - предоставляет в данное время только возможность работать с полем ввода, и виртуальной клавиатурой, которая ещё не доделана...  Для мобильных систем пока ни как не состыкована эта клавиатура, хотя для неё изначально только и делал.

Поле ввода пока только проверены на Windows и Linux. На MacOS должно работать, но пока не проверял. :-[

Надеюсь полезное видео, где я переделываю 3-ю демо-версию. В конце видео показываю, как можно использовать несколько полей ввода.

Google translate:
Hello everyone! Updated ZenGL version to 3.28.
And from this moment (and it has already happened before), the development of its own Green Engine library is now going on in parallel. Works with ZenGL only.

Sorry, but there is little information in English. But in the course of development, I add comments to the code and demos.

GE - at this time only provides the ability to work with the input field, and the virtual keyboard, which has not yet been completed ... For mobile systems, this keyboard has not yet been docked, although it was originally only done for it.

The input field has only been tested on Windows and Linux so far. It should work on macOS, but haven't tested it yet. :-[

Hopefully helpful video of me remaking the 3rd demo. (rus) At the end of the video, I show you how you can use multiple input fields.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

Blade

  • Full Member
  • ***
  • Posts: 177
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #5 on: September 16, 2021, 12:39:40 am »
Very interesting and good to see the update.  Have seen various sources that had good things to say about ZenGL. 

Hopefully, ZenGL for iOS (https://github.com/skalogryz/zengl) works or gets updated too.

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #6 on: January 02, 2022, 11:20:16 am »
FYI, the custom code used in https://github.com/Seenkao/New-ZenGL/blob/ZenGL_3_28/Zengl_SRC/src/zgl_opengles_all.pas is equally applicable to the desktop platforms that do not use OpenGLES, and significantly faster than just letting it use the default actual glBegin / glEnd that is usually does for them.

Seenkao

  • Sr. Member
  • ****
  • Posts: 446
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #7 on: January 05, 2022, 03:47:29 pm »
Blade, благодарю. По поводу iOS я ни чего не могу сказать на данный момент. У меня времени не хватает поднять код и/или включить код skalogryz. Времени на всё надо очень много, а иногда желание просто пропадает.  :(

Akira1364, вероятно что и для OpenGL ES это так же. Но надо не забывать включать batch2d_Begin/batch2d_End. Я думал это работает только для OpenGL ES, но я ошибался. Andru лучше меня знал как работает "устаревший" OpenGL/OpenGL ES - и это даёт ускорение в обоих случаях. Но надо знать, что это будет работать только при использовании функций ZenGL, пользуясь напряму OpenGL мы не получим этого ускорения (если только сами не включим дополнительный код используемый в функциях ZenGL).

Google translate:
Blade, thanks. As for iOS, I can't say anything at the moment. I don’t have enough time to raise the code and / or include the code skalogryz. It takes a lot of time for everything, and sometimes the desire just disappears. :(

Akira1364, it is probably the same for OpenGL ES. But remember to enable batch2d_Begin/batch2d_End. I thought this only works for OpenGL ES, but I was wrong. Andru knew better than me how the "outdated" OpenGL / OpenGL ES works - and this gives acceleration in both cases. But you need to know that this will only work when using ZenGL functions, using OpenGL directly, we will not get this acceleration (unless we ourselves include additional code used in ZenGL functions).
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

Seenkao

  • Sr. Member
  • ****
  • Posts: 446
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #8 on: February 27, 2022, 03:53:42 pm »
Выпущена новая версия ZenGL 3.29.
 8)
Изменения в файле Update_ZenGL.txt.

Основное из изменений: В ZenGL включён полный OpenGL по состоянию на конец 2021 года. По умолчанию включена минимальная версия, для использования основной функциональности ZenGL. Для использования полного OpenGL вам надо будет отключить в файле GLdefine.cfg дефайн USE_MIN_OPENGL (смотрите первую демо версию).

Окно и контекст окна создаются автоматически. Работу с View-портом надо настраивать. Эти функции были сделаны ещё Andru, для 2D под ZenGL подойдёт (может и вам подойдёт), для 3D надо самим настраивать функцию.
Займусь этим немного позже. Вы можете сами что-нибудь предложить.

Демки переделаны только под Lazarus, поэтому все изменения смотрите в них.

Демка LCL не будет работать в Windows 10. Я пока не решал этой проблемы. Зависает окно.

------------------------------------------------------------------------------------------------------------------------------------
Google translate:
New version ZenGL 3.29 has been released.
 8)
Changes in the file Update_ZenGL.txt.

Key changes: ZenGL includes full OpenGL as of late 2021. By default, a minimum version is enabled to use the core functionality of ZenGL. To use full OpenGL you will need to disable USE_MIN_OPENGL in the GLdefine.cfg file (see the first demo).

The window and window context are created automatically. Work with the View-port must be configured. These functions were made by Andru, for 2D under ZenGL it will work (maybe it will work for you too), for 3D you need to configure the function yourself.
I'll deal with this a little later. You can offer something yourself.

Demos are remade only for Lazarus, so look at all the changes in them.

The LCL demo won't work on Windows 10. I haven't solved this problem yet. The window hangs.
« Last Edit: February 28, 2022, 08:37:48 pm by Seenkao »
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

Seenkao

  • Sr. Member
  • ****
  • Posts: 446
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #9 on: March 15, 2023, 08:37:02 pm »
  Вышла новая версия ZenGL 3.30. Изменений достаточно немало и я не смогу их все упомнить. Всё постарался записать в файле Update_ZenGL.txt (к сожаленью только на Русском языке, прошу простить, но документацию стараюсь поддерживать и на Английском! ::)). Документирую функции в модулях. Документация на данный момент не полная.
  Основные изменения это то, что теперь для мобильных систем работает нативная клавиатура и она не зависит от системы!!! Её можно использовать как виртуальную клавиатуру для настольных ОС. Но вот про джойстики для мобильных систем - забыл... Они не доделаны.
  Клавиатура поддерживает кириллицу и латиницу. Для поддержки других раскладок клавиатур нужна помощь носителей данных языков. Если кого заинтересует, обращайтесь.

Google translate:
   New version ZenGL 3.30 has been released. There are so many changes that I can't remember them all. I tried to write everything in the file Update_ZenGL.txt (unfortunately, only in Russian, I'm sorry, but I try to support the documentation in English too! ::)). I document functions in modules. The documentation is currently incomplete.
   The main changes are that now a native keyboard works for mobile systems and it does not depend on the system!!! It can be used as a virtual keyboard for desktop OS. But I forgot about joysticks for mobile systems... They haven't been completed yet.
   The keyboard supports Cyrillic and Latin. Support for other keyboard layouts requires the assistance of native speakers of these languages. If anyone is interested, please contact.

Sorry for my English. But it's a translator...

Всем успехов!  ;D
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #10 on: May 27, 2023, 10:38:19 pm »
FYI, the reimplementations of glBegin / glEnd etc from zgl_opengles_all.pas in terms of glDrawArrays and such should definitely also be used on desktop. Currently, ZenGL on desktop just actually uses the real immediate mode functions, which is much slower than the array-based wrappers from zgl_opengles.pas.

Seenkao

  • Sr. Member
  • ****
  • Posts: 446
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #11 on: May 28, 2023, 02:34:38 am »
FYI, the reimplementations of glBegin / glEnd etc from zgl_opengles_all.pas in terms of glDrawArrays and such should definitely also be used on desktop. Currently, ZenGL on desktop just actually uses the real immediate mode functions, which is much slower than the array-based wrappers from zgl_opengles.pas.
Благодарю за замечание! Но для персональных компьютеров, в ZenGL мы не можем использовать функции и процедуры из zgl_opengles_all.pas, они замедлят работу настольных компьютеров  :( .
Если переделывать, то переделывать надо будет полностью и делать общие функции и для OpenGL и для OpenGL ES.
Я думал уже над этим, и,  вероятно я займусь этим. Но, так же это надо будет сделать и для версий OpenGL 3+ (на выбор пользователя-программиста).

Google translate:
Thanks for the note! But for personal computers, in ZenGL we can't use functions and procedures from zgl_opengles_all.pas, they will slow down desktop computers :( .
If you redo it, then you will have to completely redo it and make common functions for both OpenGL and OpenGL ES.
I've already thought about it, and I'll probably do it. But, it will also need to be done for versions of OpenGL 3+ (at the choice of the user-programmer).
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

 

TinyPortal © 2005-2018