Recent

Author Topic: ZenGL Update +android + MacOS Cocoa + Green Engine  (Read 26313 times)

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #15 on: July 18, 2021, 08:28:28 am »
Сразу же внёс корректировки для MacOS Cocoa.
- оказывается, что в версии 3.27 была удалена часть кода. Как раз для MacOS.
- и так же оказалось, что в MacOS Cocoa нет "отжатия" клавиши "CapsLock". Ориентируйтесь в ZenGL только на нажатие этой клавиши.
(демки новой версии ZenGL для MacOS могут не работать - в ближайшее время исправлю. Для ZenGL 3.27 - работают)

Google translate:
Immediately made adjustments for macOS Cocoa.
- it turns out that in version 3.27 part of the code was removed. Just right for macOS.
- and it also turned out that in MacOS Cocoa there is no "release" of the "CapsLock" key. Focus only on pressing this key in ZenGL.
(demos of the new version of ZenGL for MacOS may not work - I will fix it in the near future. For ZenGL 3.27 - they work)
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #16 on: February 27, 2022, 12:48:20 am »
Привет!
Выпущена новая версия 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:
Hey!
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:38:42 pm by Seenkao »
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #17 on: February 28, 2022, 08:41:39 pm »
Обновил репозиторий.

Все демки обновлены. Исправлены баги и недочёты. С Windows 10 разобрался. Там проблемы с таймерами и обработкой внутреннего цикла ZenGL.

Если собираетесь работать с LCL, то во многих вызываемых процедурах надо выключать/включать таймер, чтобы не накладывались события друг на друга. Я понимаю, что это не лучший способ, но меня честно не интересовал LCL, поэтому это только возможное рабочее решение. Вы можете попробовать делать это без таймера.

Так же, если используете LCL, то забудьте об обработке мыши и клавиатуры средствами ZenGL, используете средства LCL.

Для FreePascal-демок вам придётся самим прописать путь до FPC в маке-файле.

--------------------------------------------------------------------------------------------------------------
Google translate:
Updated the repository.

All demos have been updated. Fixed bugs and shortcomings. Got it with Windows 10. There are issues with timers and ZenGL inner loop handling.

If you are going to work with LCL, then in many called procedures you need to turn off / turn on the timer so that events do not overlap each other. I realize this isn't the best way, but I honestly wasn't interested in LCL, so this is only a possible working solution. You can try doing this without a timer.

Also, if you use LCL, then forget about mouse and keyboard processing with ZenGL tools, use LCL tools.

For FreePascal demos, you will have to write the path to the FPC in the makefile yourself.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #18 on: March 28, 2022, 07:44:40 pm »
Обновлена текущая версия ZenGL.
На видео показано два варианта прямой работы с OpenGL. Определённый код можно вынести в отдельный модуль для использования в разных проектах. Например матрицы, загрузку шейдеров, создание буферов.
Код пока только на видео, при необходимости могу выложить на GitHub.  ;D

Google translate:
Updated current version of ZenGL.
The video shows two options for working directly with OpenGL. Certain code can be moved to a separate module for use in different projects. For example matrices, loading shaders, creating buffers.
The code is only on video so far, if necessary, I can put it on GitHub. ;D
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #19 on: March 28, 2022, 08:00:23 pm »
Thank you for the update.

ZenGL was very interesting for me, I found it some years ago when I was looking for a game/graphics engine. Unfortunately, I heard the original author had abandoned it. Was it true?

How to make ZenGL work on Android? Is it difficult? Using LAMW? I mean, I was a fan of LAMW and I wanted to do graphics things on Android. Unfortunately LAMW's jCanvasES1 and jCanvasES2 both had serious bugs make them unusable for real projects. I ever posted the issues but no one can fix them. If I can make Android games using Lazarus + ZenGL, I will be a fan of ZenGL.
« Last Edit: March 28, 2022, 08:07:38 pm by Handoko »

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #20 on: March 28, 2022, 08:26:08 pm »
Подождите немного, мне надо подготовить информацию, особенно на английском языке.  :)
Да, автор занялся своими делами и перешёл на ЯП C/C++. И это было очень давно. Дальнейшая разработка ZenGL мной, была с ним согласована. Он был не против.

google translate:
Wait a bit, I need to prepare information, especially in English. :)
Yes, the author went about his business and switched to C/C++. And that was a very long time ago. Further development of ZenGL by me was agreed with him. He didn't mind.
« Last Edit: March 28, 2022, 08:29:05 pm by Seenkao »
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #21 on: March 29, 2022, 03:43:21 pm »
ANDROID rus

Похоже пора пробежаться по тому как разрабатывать под Android на английском языке...  :-[

Что нужно знать:
- ВНИМАНИЕ! Выбирайте проекты под нужные архитектуры. В ZenGL включены библиотеки ARMV5, ARMV6, ARMV7A, AARCH64 (ARMV8A), x86, x86_64.
- Все библиотеки для основных архитектур Adnroid собраны. Теперь вы можете собрать под проект под нужный для вас телефон.
- Так же стоит знать, что ZenGL использует OpenGL ES 1(1.1). На данное время идёт работа над включением в ZenGL - OpenGL ES 2.0 и выше. И так же надо будет создавать контекст для данной версии.
- ВНИМАНИЕ! Если вы хотите компилировать проекты под архитектуры ARMV5 и ARMV6 вы должны отключить дефайн CPUARMV7A в файле настроек zgl_config.cfg.
- 16-я демка будет работать только с архитектурами ARMV5 и ARMV6. На данное время не собраны библиотеки для других архитектур.

В папке с демками для Android вы можете найти файл с помощью по сборке проекта.

Начнём. ::)

Для сборки проекта вам необходимо настроить кросскомпилятор FPC под архитектуры Android, которые вы будете использовать.
Так же вам нужна среда разработки Eclipse 2019-го года (более поздние версии в настоящее время не поддерживают разработку под Android).

Настройте среду разработки Eclipse для разработки под Android.
Например так (Rus):
https://www.fandroid.info/ustanovka-eclipse-i-podklyuchenie-plagina-android-development-tools-adt-dlya-razrabotki-android-prilozhenij/
Используйте Java 8. Я не нашёл способа собрать проекты с более новыми версиями Java.

Рассмотрим любую из демок, которые есть в папке Android.
Импортируем папку с проектом в Eclipse.
Quote
File -> Import -> (Android -> Existing Android Code Into Workspace) Next
Root directory -> Browse
... выбираем папку проекта ... -> OK
Finish
Открываем Lazarus и в нём "Открыть проект", заходим в ту же папку, которую импортировали в Eclipse. Далее заходим в папку jni и открываем сам проект. Компилируем.

Заходим в Eclipse, обновляем проект. Запускаем. Он должен пройти сборку и на выходе в папке bin будет готовый APK-файл.
------------------------------------------------------------------------------

ANDROID eng

Google translate:
Looks like it's time to go over how to develop for Android in English... :-[

What you need to know:
- WARNING! Choose projects for the required architectures. ZenGL includes ARMV5, ARMV6, ARMV7A, AARCH64 (ARMV8A), x86, x86_64 libraries.
- All libraries for major Adnroid architectures are built. Now you can build a project for the phone you need.
- It's also worth knowing that ZenGL uses OpenGL ES 1(1.1). At this time, work is underway to include in ZenGL - OpenGL ES 2.0 and higher. And it will also be necessary to create a context for this version.
- WARNING! If you want to compile projects for ARMV5 and ARMV6 architectures, you must disable the CPUARMV7A defin in the zgl_config.cfg configuration file.
- Demo 16 will only work with ARMV5 and ARMV6 architectures. At this time, libraries for other architectures have not been compiled.

In the folder with Android demos you can find the file with the project build help.

Let's get started. ::)

To build the project, you need to configure the FPC cross compiler for the Android architectures that you will use.
You also need the 2019 Eclipse development environment (later versions do not currently support Android development).

Set up the Eclipse development environment for Android development.
For example like this (Eng):
https://www.tutorialspoint.com/android/android_eclipse.htm
Use Java 8. I haven't found a way to build projects with newer versions of Java.

Consider any of the demos that are in the Android folder.
Importing the project folder into Eclipse.
Quote
File -> Import -> (Android -> Existing Android Code Into Workspace) Next
Root directory -> Browse
... select the project folder ... -> OK
Finish
Open Lazarus and in it "Open project", go to the same folder that we imported into Eclipse. Next, go to the jni folder and open the project itself. Compiling.

We come into Eclipse, we update the project. We launch. It must go through the assembly and the output in the bin folder will be the finished APK file.
------------------------------------------------------------------------------

Видео по сборке приложения под Android.

Вероятнее всего проекты можно собрать и другим путём. Но я не стал сильно вдаваться в эти возможности.
Всего хорошего!  8)


Google translate:
Video on creating an Android application

I hope it will be clear and without translation what I'm doing.

Most likely, projects can be collected in another way. But I didn't go into those possibilities too much.
Best wishes! 8)
« Last Edit: July 04, 2023, 08:46:43 pm by Seenkao »
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #22 on: March 29, 2022, 04:13:49 pm »
Thank you for the tutorial.

I built the final project in Eclipse. Java 8 was used ...

That's the problem. I am only a hobbyist, I do not have much time to learn something new. I wish I have because there are already a long list of things I want to study: Castle Game Engine, Python, PHP, C++, Vulcan, etc. I ever spent some time to try Java, the language seemed too weird to me.  %)

Have you tried LAMW. Maybe you can make ZenGL as a component tobe able to used in LAMW. I am currently learning OpenGL, hope someday I can fix he OpenGL issue in LAMW. You're good in OpenGL, perhaps you can help fixing the bugs:
https://forum.lazarus.freepascal.org/index.php/topic,32951.msg212717.html#msg212717
https://forum.lazarus.freepascal.org/index.php/topic,39714.msg280170.html#msg280170
« Last Edit: March 29, 2022, 04:16:04 pm by Handoko »

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #23 on: March 29, 2022, 05:03:27 pm »
Thank you for the tutorial.
  :)

Quote
That's the problem. I am only a hobbyist, I do not have much time to learn something new. I wish I have because there are already a long list of things I want to study: Castle Game Engine, Python, PHP, C++, Vulcan, etc. I ever spent some time to try Java, the language seemed too weird to me.  %)
На самом деле это не так трудно, как кажется. Вам даже java изучать не нужно. Нужно настроить Eclipse один раз и с его помощью собирать проекты. А весь java-код я старался уже привести к нужному виду. И тогда, когда появится больше времени, можно будет изучать java и включать дополнения. Хотя наверняка и в LAWM то же самое может быть, он удобнее тем, что не надо две оболочки запускать. Делает он так же java-код, смешивая с нативным. И вполне возможно, зная java, можно собрать более корректное приложение.

По первой ссылке - на взгляд там неправильное определение матриц. Должно быть что-то вроде этого:

google translate:
It's actually not as difficult as it seems. You don't even need to learn Java. You need to set up Eclipse once and use it to build projects. And I tried to bring all the java code to the desired form. And then, when more time appears, it will be possible to study java and include additions. Although for sure the same thing can happen in LAWM, it is more convenient because you do not need to run two shells. He does the same java code, mixing with native. And it is quite possible, knowing java, you can build a more correct application.

According to the first link - it looks like there is an incorrect definition of matrices. Should be something like this:
Code: Pascal  [Select][+][-]
  1. glMatrixMode(GL_PROJECTION);
  2.   glLoadIdentity();
  3.   gluPerspective(oglFOVY, oglWidth / oglHeight, oglzNear, oglzFar);
  4.   glMatrixMode(GL_MODELVIEW);
  5.   glLoadIdentity();

Я извиняюсь, но по второй ссылке ни чем помочь не могу. Там надо влазить в LAWM смотреть как это устроено... А я и так при установке давным давно перелопачивал его для себя, чтоб запустить. Разработчик на то что я сделал ни чего не ответил, потому я просто забил. ))) Сам LAWM достаточно интересен, для быстрой сборки проектов. Собирает он достаточно небольшие приложения, но меня почему-то не очень это увлекло.
google translate:
I'm sorry, but I can't help you with the second link. There you need to get into LAWM to see how it works ... And so, during the installation, a long time ago I shoveled it for myself in order to launch it. The developer did not answer what I did, so I just scored. ))) LAWM itself is quite interesting for quick assembly of projects. It collects fairly small applications, but for some reason I was not very interested in it.
« Last Edit: March 29, 2022, 05:13:28 pm by Seenkao »
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #24 on: March 29, 2022, 05:32:31 pm »
According to the first link - it looks like there is an incorrect definition of matrices. Should be something like this:
Code: Pascal  [Select][+][-]
  1. glMatrixMode(GL_PROJECTION);
  2.   glLoadIdentity();
  3.   gluPerspective(oglFOVY, oglWidth / oglHeight, oglzNear, oglzFar);
  4.   glMatrixMode(GL_MODELVIEW);
  5.   glLoadIdentity();

I will certainly try it when I have time. I haven't use LAMW for a very long time and it is not installed on my computer.

It's actually not as difficult as it seems. You don't even need to learn Java. You need to set up Eclipse once and use it to build projects.

But then I will need to learn the Android framework and learn how to 'call' them in FPC. LAMW is not perfect but what I like most is it already has plenty of ready-to-use components, I can simple write code in Pascal and almost no need to deal about the Android framework.

Anyways, thank you for the information. I might try to learn what you suggested if I have time.

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #25 on: March 29, 2022, 05:54:51 pm »
But then I will need to learn the Android framework and learn how to 'call' them in FPC. LAMW is not perfect but what I like most is it already has plenty of ready-to-use components, I can simple write code in Pascal and almost no need to deal about the Android framework.

Anyways, thank you for the information. I might try to learn what you suggested if I have time.
Я думаю вам надо попробовать! Не попробуешь, не узнаешь о чём идёт речь. Вам даже не обязательно знать фреймворки Android для того чтоб пользоваться ZenGL.
Я тоже им не сразу стал пользоваться. :)
google translate:
I think you should try! If you don't try, you won't know what it's all about. You don't even need to know Android frameworks to use ZenGL.
I didn't use it right away either. :)
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #26 on: May 06, 2022, 01:50:42 pm »
Обновлена последняя версия ZenGL. И стабилизирована для работы с Android.
Исправлены мелкие недочёты.
Возможны мелкие ошибки, просьба сообщать, для скорейших исправлений.

Google translate:
Updated the latest version of ZenGL. And stabilized to work with Android.
Fixed minor bugs.
There may be minor errors, please report, for speedy corrections.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

loaded

  • Hero Member
  • *****
  • Posts: 824
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #27 on: May 06, 2022, 02:41:15 pm »
Seenkao
Updated the latest version of ZenGL. And stabilized to work with Android. Fixed minor bugs. There may be minor errors, please report, for speedy corrections.
Thank you so much for your hard work and effort.
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #28 on: May 21, 2022, 09:43:17 pm »
loaded, thank!

----------------------------------------------
На данное время думаю как реализовать демо-версию, для показа реализации джойстиков для Android и возможности их использования.

Gogle translate:
At this time, I'm thinking about how to implement a demo to show the implementation of joysticks for Android and the possibility of using them.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: ZenGL Update +android + MacOS Cocoa + Green Engine
« Reply #29 on: March 15, 2023, 12:14:03 pm »
Привет!

  Вышла новая версия ZenGL 3.30. Изменений достаточно немало и я не смогу их все упомнить. Всё постарался записать в файле Update_ZenGL.txt (к сожаленью только на Русском языке, прошу простить, но документацию стараюсь поддерживать и на Английском! ::)).
  Основные изменения это то, что теперь для мобильных систем работает нативная клавиатура и она не зависит от системы!!! Её можно использовать как виртуальную клавиатуру для настольных ОС. Но вот про джойстики для мобильных систем - забыл... Они не доделаны.
  Клавиатура поддерживает кириллицу и латиницу. Для поддержки других раскладок клавиатур нужна помощь носителей данных языков. Если кого заинтересует, обращайтесь.

Google translate:
Hello!

   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! ::)).
   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: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

 

TinyPortal © 2005-2018