Recent

Author Topic: ZenGL improve  (Read 5750 times)

Seenkao

  • Jr. Member
  • **
  • Posts: 59
Re: ZenGL improve
« Reply #15 on: May 20, 2020, 04:05:36 pm »
Всё останется в свободном доступе!  :)
Сначала - доделываем ошибки, не выкладывая.
Когда основная часть доделана- выкладываем.
Если у кого-то есть какие-то наработки - я готов выслушать. Но не добавить! Добавить только когда уверен, что код подойдет для библиотеки. - когда эти наработки - доработаны!

ZenGL 3.20 уже выложен на русском форуме! Я продолжаю с ним работать.

translate:
Everything will remain in the public domain! :)
First, we finish the mistakes without spreading them.
When the main part is completed, lay out.
If you have any developments, I’m ready to listen. But do not add! Suitable for the library. - when these developments are finalized!

ZenGL 3.20 has already been posted on the Russian forum! I continue to work with him.

Seenkao

  • Jr. Member
  • **
  • Posts: 59
Re: ZenGL improve
« Reply #16 on: August 08, 2020, 09:22:45 pm »
New version: https://yadi.sk/d/s2D7RYTuGlVagw - ZenGL 3.24

Sorry, look to Russian forum. And information in Russian... :-[

circular

  • Hero Member
  • *****
  • Posts: 3440
    • Personal webpage
Re: ZenGL improve
« Reply #17 on: August 08, 2020, 10:17:50 pm »
Hi, thanks for sharing.

I tried it on MacOS 64 bit, though it does not compile.

in zgl_log, from line 60, the {$IfDef UNIX} and {$IFDEF MACOSX} directive are both active. This can be solved by merging then:
Code: [Select]
  {$IfDef UNIX}
      {$IFDEF MACOSX}
      if not Assigned(logFile) Then
        logFile := utf8_GetPAnsiChar(appWorkDir + '../log.txt')
      {$ELSE}
      if not Assigned(logFile) Then
        logFile := utf8_GetPAnsiChar('log.txt')
      {$ENDIF}
  {$ENDIF}

Then there are missing functions in FreePascal and I don't know what to do.

In zgl_utils, on line 498, the StandardAlert function is used. It seems to be in MacWindows unit but adding it doesn't help because the function is included only for 32bit system.

Same problem in zgl_windows, on line 163, the functions SelectWindow and ShowWindow are not available.
Conscience is the debugger of the mind

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2514
    • havefunsoft.com
Re: ZenGL improve
« Reply #18 on: August 08, 2020, 11:00:41 pm »
for macos 64-bit try this zengl fork

Even though the fork might compile it's outdated from Apple perspective.
For audio a deprecated API is used.
OpenGL/OpenGLES is still in used and Metal implementation is required.
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Seenkao

  • Jr. Member
  • **
  • Posts: 59
Re: ZenGL improve
« Reply #19 on: August 08, 2020, 11:07:16 pm »
Same problem in zgl_windows, on line 163, the functions SelectWindow and ShowWindow are not available.


project parameters:
operating system -> Darwin (not MacOS!!!!)
processor family -> x86_64

try and please tell me the result

If you check the demo versions, then use "demoN" but not "demoN_macosx" (as a recommendation  :-[ ) and also report the result.

Sorry, google translate...

Seenkao

  • Jr. Member
  • **
  • Posts: 59
Re: ZenGL improve
« Reply #20 on: August 08, 2020, 11:10:02 pm »
OpenGL/OpenGLES is still in used and Metal implementation is required.

Нет, не отказались от OpenGL ES, но в ZenGL используется эмулируемая часть OpenGL ES, точнее версия 1.0.

google translate:
No, they did not abandon OpenGL ES, but ZenGL uses the emulated part of OpenGL ES, more precisely version 1.0.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2514
    • havefunsoft.com
Re: ZenGL improve
« Reply #21 on: August 08, 2020, 11:12:04 pm »
Нет, не отказались от OpenGL ES, но в ZenGL используется эмулируемая часть OpenGL ES, точнее версия 1.0.
I'm referring to Apple. macOS and iOS still support OpenGL/OpenGLES supported applications.
Yet, Apple suggests that Metal should be used.

I do have a ZenGL game published on AppStore. (it was not a success), but the Apple has not removed it yet from the Apple store due to the use of outdated APIs.

Yet, I think Apple will require me to update API use, if I try to release another version of the game.
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Seenkao

  • Jr. Member
  • **
  • Posts: 59
Re: ZenGL improve
« Reply #22 on: August 08, 2020, 11:17:55 pm »
Да, вероятнее всего вы правы. Но OpenGL ES не  показывается на их сайте сейчас в числе устаревших.

Но требовать они будут Metal.

google translate:
Yes, you are most likely right. But OpenGL EU is not showing up on their website now as outdated.

But they will demand Metal.

circular

  • Hero Member
  • *****
  • Posts: 3440
    • Personal webpage
Re: ZenGL improve
« Reply #23 on: August 09, 2020, 09:08:27 am »
project parameters:
operating system -> Darwin (not MacOS!!!!)
processor family -> x86_64

try and please tell me the result

If you check the demo versions, then use "demoN" but not "demoN_macosx" (as a recommendation  :-[ ) and also report the result.
Same error in all cases.

for macos 64-bit try this zengl fork
It does not find DMGetGDeviceByDisplayID used in zgl_opengl. It seems to be in Displays unit but not available on 64 bit CPU.

About OpenGL, it still works on iMac 64 bit.
Conscience is the debugger of the mind

Seenkao

  • Jr. Member
  • **
  • Posts: 59
Re: ZenGL improve
« Reply #24 on: August 09, 2020, 10:12:03 am »
https://youtu.be/5Uz-TvmTn7Y - this is how it looks for me.

Possible Solution: in zgl_config.cfg

// macOS ???
{$IFDEF MacOSAll}
  {$DEFINE MACOSX}
{$ENDIF} 

but I do not know what the result will be for other computers and not only.
(но я не знаю какой будет результат для других компьютеров и не только)

circular

  • Hero Member
  • *****
  • Posts: 3440
    • Personal webpage
Re: ZenGL improve
« Reply #25 on: August 09, 2020, 10:42:01 am »
Yeah I understand. I tried it but the problem is in the FreePascal library.

I am using Lazarus 2.0.10 with FPC 3.2.0. Maybe it was fixed in trunk?

Below the code in the files. In MacWindows, a directive deactivates the code.
Conscience is the debugger of the mind

Seenkao

  • Jr. Member
  • **
  • Posts: 59
Re: ZenGL improve
« Reply #26 on: August 09, 2020, 10:55:51 am »
to check, write this define (if this define...)
именно для 64-х битных систем
specifically for 64 bit systems (google translate)
apparently it is not spelled out somewhere or is disabled for something

... вообще странные танцы с бубном...

emulator MacOS?
« Last Edit: August 09, 2020, 10:57:46 am by Seenkao »

Seenkao

  • Jr. Member
  • **
  • Posts: 59
Re: ZenGL improve
« Reply #27 on: August 10, 2020, 01:20:10 am »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2514
    • havefunsoft.com
Re: ZenGL improve
« Reply #28 on: August 10, 2020, 03:21:56 am »
It does not find DMGetGDeviceByDisplayID used in zgl_opengl. It seems to be in Displays unit but not available on 64 bit CPU.
I take this back now.
I didn't update it to be macOS 64 bit compatible. I only made it to work for iOS 64-bit
ZenGL for macOS was written using Carbon. it needs to be updated to use Cocoa (AppKit)
iOS application was written using UIKit already.

About OpenGL, it still works on iMac 64 bit.
Sure it does. But the question is IF Apple accepts applications written with OpenGL use to their AppStore.
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Seenkao

  • Jr. Member
  • **
  • Posts: 59
Re: ZenGL improve
« Reply #29 on: August 11, 2020, 05:16:00 pm »
Attention!!!!
In Unix-system, in non-LCL in the launched module, you must set:

Code: Pascal  [Select][+][-]
  1. uses
  2.   {$IfDef UNIX}
  3.   cthreads
  4.   {$EndIF}
  5.  
  6.  
« Last Edit: August 11, 2020, 05:49:35 pm by Seenkao »

 

TinyPortal © 2005-2018