Recent

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

Seenkao

  • Hero Member
  • *****
  • Posts: 676
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #15 on: December 21, 2024, 05:46:08 pm »
Выпущена новая версия 4.14, изменений не много:
- корректирована работа с мышью, как оказалось, если окно не занимает всё рабочее пространство, то мышь могла работать не корректно.
- добавлен флаг "ERROR_MOUSE_DXDY", если мышь вне пределов окна, то "mouseDX" и "mouseDY" будут возвращать данные значения.
- таймера теперь работают с типом Double (раньше были LongWord), для большей точности, но требуется проверка.
- возвращены функции: "u_IntToStr", "u_StrToInt", "u_FloatToStr", "u_StrToFloat", "u_BoolToStr" и "u_StrToBool" (в версии 4.13 были удалены, но это вызвало не совсем верную работу логов).
- добавлены функции: "u_DoubleToStr" и "u_StrToDouble" (мне надоело бодаться с Delphi  и вместо переопределения я их сделал отдельно).
- добавлены флаги: "WINDOW_FOR_FULL_X", "WINDOW_FOR_FULL_Y", "WINDOW_FULL_WIDTH" и "WINDOW_FULL_HEIGHT" - возвращают значения полного рабочего окна (не корректированного). Теперь флаги: "WINDOW_X", "WINDOW_Y", "WINDOW_WIDTH" и "WINDOW_HEIGHT" - возвращают значения корректированного окна (значения результата функции zgl_Get для этих флагов могут совпадать, если корректировки не производилось).
- немного корректирован код для Mac.

Дополнительно ввёл новые функции в файл "zgl_text.pas", так как собираюсь создавать диалоговые окна: "procedure CreateDataDialog(font: LongWord; Width, Height: Integer);" и "procedure AddTextDialog(const Text: UTF8String; Flags: LongWord; Scale: Single = 1; Color: LongWord = cl_White);". Ни где примеров работы с ними нет. С их помощью можно выводить разнообразный текст в определённую область, но делал я её для вывода в текстуру.

--------------------------------------------
Google translate:
Released new version 4.14, not many changes:
- corrected work with the mouse, as it turned out, if the window does not occupy the entire workspace, then the mouse could work incorrectly.
- added the flag "ERROR_MOUSE_DXDY", if the mouse is outside the window, then "mouseDX" and "mouseDY" will return these values.
- timers now work with the Double type (previously they were LongWord), for greater accuracy, but verification is required.
- returned functions: "u_IntToStr", "u_StrToInt", "u_FloatToStr", "u_StrToFloat", "u_BoolToStr" and "u_StrToBool" (in version 4.13 they were removed, but this caused not quite correct work of logs).
- added functions: "u_DoubleToStr" and "u_StrToDouble" (I got tired of butting heads with Delphi and instead of redefining them I made them separately).
- added flags: "WINDOW_FOR_FULL_X", "WINDOW_FOR_FULL_Y", "WINDOW_FULL_WIDTH" and "WINDOW_FULL_HEIGHT" - return values ​​of the full working window (not adjusted). Now the flags: "WINDOW_X", "WINDOW_Y", "WINDOW_WIDTH" and "WINDOW_HEIGHT" - return values ​​of the adjusted window (the values ​​of the zgl_Get function result for these flags may coincide if no adjustments were made).
- slightly adjusted code for Mac.

Additionally, I added new functions to the "zgl_text.pas" file, since I am going to create dialog boxes: "procedure CreateDataDialog(font: LongWord; Width, Height: Integer);" and "procedure AddTextDialog(const Text: UTF8String; Flags: LongWord; Scale: Single = 1; Color: LongWord = cl_White);". There are no examples of working with them anywhere. With their help, you can output various text to a certain area, but I did it for output to a texture.

 :-[
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

fireboxsoft

  • New Member
  • *
  • Posts: 11
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #16 on: December 28, 2024, 03:10:00 am »
please help me
windows7 + lazarus 3.6

Seenkao

  • Hero Member
  • *****
  • Posts: 676
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #17 on: December 28, 2024, 08:48:51 am »
Прошу прощения, это очередной мой недочёт...

Я перезалил последнюю версию, скачайте заново пожалуйста.

На данный момент при проверке демок на Windows 7 (на ноутбуке) я поймал неожиданные недочёты. Неправильная коррекция экрана. Возможно из-за того, что разрешение монитора меньше чем создаваемое окно. В дальнейшем буду тестить и исправлять ошибку.

Благодарю за проверку! Если будут ещё какие-то ошибки или вопросы, обращайтесь.

--------------------------------------
Google translate:
Sorry, this is another of my shortcomings...

I re-uploaded the latest version, please download it again.

At the moment, when checking the demos on Windows 7 (on a laptop), I caught unexpected shortcomings. Incorrect screen correction. Perhaps because the monitor resolution is smaller than the window being created. In the future, I will test and fix the error.

Thank you for checking! If there are any other errors or questions, please contact me.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

fireboxsoft

  • New Member
  • *
  • Posts: 11
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #18 on: December 28, 2024, 01:20:46 pm »
Chinese:太感谢了!刚刚下载了最新版本,经过测试,成功编译,demo顺利运行!但对于中文的显示目前没有成功,中文显示是"?",我再研究研究
Eng:Thank you so much! I just downloaded the latest version. After testing, it was successfully compiled and the demo ran smoothly! However, the Chinese display has not been successful so far. The Chinese display is "?". I will study it further.

fireboxsoft

  • New Member
  • *
  • Posts: 11
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #19 on: December 28, 2024, 02:22:05 pm »
I have learned how to display Chinese and successfully displayed Chinese, thank you:)
utf8_Copy( PAnsiChar('中文'))

Seenkao

  • Hero Member
  • *****
  • Posts: 676
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #20 on: December 28, 2024, 02:57:02 pm »
Да, я забыл, что для отображения дополнительного языка, нужно сделать дополнительный шрифт с символикой данного языка. Используя генератор шрифтов ZenFont. Привык что либо латиница, либо кириллица, где уже всё подготовлено для вывода.

Важно! Надо помнить, что не все шрифты поддерживают китайский язык (или какой-то дополнительный).
Меняйте шрифты один за другим, пока не добьётесь успеха, особенно если введённые вами символы отобразились в поле ввода Edit.

-------------------------------------
Google translate:
Yes, I forgot that to display an additional language, you need to make an additional font with the symbols of this language. Using the font generator ZenFont. I'm used to either Latin or Cyrillic, where everything is already prepared for output.

Important! Remember that not all fonts support Chinese (or any additional language).
Change fonts one by one until you succeed, especially if the characters you entered are displayed in the Edit input field.
« Last Edit: December 28, 2024, 03:25:34 pm by Seenkao »
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

Seenkao

  • Hero Member
  • *****
  • Posts: 676
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #21 on: December 28, 2024, 03:17:56 pm »
I have learned how to display Chinese and successfully displayed Chinese, thank you:)
utf8_Copy( PAnsiChar('中文'))
я наверняка дольше это делал.  :-[ Но тоже получилось.
Когда вы реализовали свой шрифт, то достаточно указать в начале страницы {$Codepage UTF8} и не обязательно будет указывать ни "PAnsiChar", ни делать преобразование "utf8_Copy". У меня отображалось и без этого, если я указал что кодовая страница UTF-8.

--------------------------------------
Google translate:
I probably did it longer. :-[ But it worked too.
When you have implemented your font, it is enough to specify {$Codepage UTF8} at the beginning of the page and it will not be necessary to specify either "PAnsiChar" or to do the "utf8_Copy" conversion. It was displayed for me without this, if I specified that the code page is UTF-8.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

Seenkao

  • Hero Member
  • *****
  • Posts: 676
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #22 on: December 28, 2024, 06:22:51 pm »
Обновил версию 4.14 и исправил ошибки в Windows связанные со "ScreenResolution" окна и созданием полноэкранного окна (возможно не все ошибки исправил).

Google translate:
Updated version 4.14 and fixed errors in Windows related to "ScreenResolution" of the window and creating a full-screen window (maybe not all errors were fixed).

Download ZenGL.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

fireboxsoft

  • New Member
  • *
  • Posts: 11
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #23 on: December 29, 2024, 08:14:36 am »
eng:Thanks for the correction, but I failed to compile demo1 after downloading the latest version.

fireboxsoft

  • New Member
  • *
  • Posts: 11
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #24 on: December 29, 2024, 08:38:54 am »
I changed the Width and Height in [u_Warning( 'Cannot set fullscreen mode: ' + u_IntToStr( Width ) + 'x' + u_IntToStr( Height ) ); ] in line 1001 of zgl_screen.pas to [wndWidth] and [wndHeight] , compiled successfully, and the demo runs normally, and Chinese can be displayed directly.

Seenkao

  • Hero Member
  • *****
  • Posts: 676
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #25 on: December 29, 2024, 09:31:19 am »
fireboxsoft, благодарю! Это опять мой недочёт, делал на одном компьютере, а правки вносил на другом без проверки (хотя мог проверить, в очередной раз поспешил). Исправления внёс.

Google translate:
fireboxsoft, thank you! This is my mistake again, I did it on one computer and made the edits on another without checking (although I could have checked, I was in a hurry again). I made the edits.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

fcu

  • Full Member
  • ***
  • Posts: 112
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #26 on: December 30, 2024, 02:06:59 pm »
Hi SeenKao , is it possible to build ZenGL as a single DLL

Seenkao

  • Hero Member
  • *****
  • Posts: 676
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #27 on: December 30, 2024, 02:15:44 pm »
fcu, да можно, но многой функциональности будет не хватать (что может вызвать ошибки при работе приложения), я потихоньку собираю все необходимые функции для создания динамических библиотек.

Google translate:
fcu, yes, it is possible, but a lot of functionality will be missing (which can cause errors when running the application), I am slowly collecting all the necessary functions for creating dynamic libraries.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

fcu

  • Full Member
  • ***
  • Posts: 112
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #28 on: December 30, 2024, 03:09:35 pm »
thanks , if i remember correctly the old zengl has a shared library building option (https://github.com/goldsmile/zengl/tree/master/src/Lazarus) , could it be adapted with the new zengl ? 

Seenkao

  • Hero Member
  • *****
  • Posts: 676
    • New ZenGL.
Re: ZenGL +android + MacOS Cocoa (beta)
« Reply #29 on: December 30, 2024, 03:26:07 pm »
fcu, новая версия - это улучшенная старая версия, которая исправляет множество мелких ошибок и работа определённой функциональности производится по другому. Именно из-за изменений нет возможности собрать динамическую библиотеку.

Для создания динамической библиотеки надо добавить как минимум основную функциональность новой библиотеки. Это может сработать, но если не будет полной функциональности, то может ломаться в любом месте программы (потому что может не хватать необходимых вызовов).

Да, я постараюсь побыстрее заняться этим и внести всю необходимую функциональность. И в дальнейшем её поддерживать.


-------------------------------
Google translate:
fcu, the new version is an improved old version that fixes many minor bugs and certain functionality works differently. It is because of the changes that it is not possible to build a dynamic library.

To create a dynamic library, you need to add at least the basic functionality of the new library. This may work, but if there is no full functionality, it may break anywhere in the program (because the necessary calls may be missing).

Yes, I will try to get to this as soon as possible and add all the necessary functionality. And support it in the future.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

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

 

TinyPortal © 2005-2018