Paul, Thanks a lot for you work! François Piette The main significance of this work - its done without failmonkey (fm) - the only stopping barrier from Delphi crossplatform progress and future of Delphi at all! Emb boses didn't get it for more than two years, they even don't see absence of any real apps done with fm. And we should to ask Paul to do the same work for Windows, Mac, iOS! By the way François, tons of firemonkey robo-flying-Rubik's Cube's and other useless demos you can find here: http://blogs.embarcadero.com/vsevolodleonov/2013/12/24/mobilegraphicsxe5/
François Piette FireMonkey is not the only way to get crossplatform solution ;) CubeMan3D V2 for XE2..XE5 can be build on Win32/64 MacOS and Android :) http://cc.embarcadero.com/item/29684
Actually this is more a demo for OpenGL on different platforms. It would be interesting to add a button to display a color picker and change CubeMan3D color. I guess it would be difficult using OpenGL but easy using FireMonkey (Which anyway makes use of OpenGL on the mobile Platform).
It's a demo of Delphi's capability to compile the same code for different platforms. Anyway, I'm comfortable with OpenGL; FireMonkey is an abstraction level with its own concepts. Look at the LowLevel3D demo, it uses three different shaders to match DirectX9, 10 or GLSL while the same OpenGL code can run on all the platforms including Windows. Firemonkey should allow the programmer to use OpenGL under Windows with a direct access to it's API.
About the code: it's just a demo It show quickly the differences between platforms (except for MacOS that require lot of code in a second unit). CrossControls (http://cc.embarcadero.com/Item/28968) use a specific sub-unit for each platform.; TControl inherit from TOSControl defined in one of those sub-unit.
Paul TOTH I don't know if it is possible to select which underlying API FireMonkey use Under Windows. I'm almost sure they use DirectX whenever possible because this is the fastest one on Windows et better supported because of the game market.
François Piette they wanted to get the fast speed, but got only troubles for themselves and end users - the 3d fmx apps works slower than any OpenGL based app on win. The exact same song with styles - wanted so they can do everything by styles, and as a result because of the complexities of brakes and glitches that got fmx use about 3.5 developers worldwide and then only with prayers.
Sergionn Rad I don't know for the FMX speed. What I know is that any abstraction layer has a speed impact. This is a trade-off one has to make when using any abstraction layer. If you want to discuss that, please open a new discussion so that Paul's post is not polluted and other can better be attracted by a better subject for that matter.
François Piette The person who started talk about fmx in this post WAS YOU - it looks like they ask you for promotion that fail framework so you don't like someone talk about it in bad light or offers alternative solutions as Paul did, shame to you, and mvp like you, by doing that you bring Delphi to full laydown.....
Very nice! And thanks for sharing! We're having a separate discussion about splash screens. This app start at once!!! Even on older devices. I had a quick look to see if it would be possible to use this approach to make a splash screen. Unfortunately once FMX.Forms is added the black screen is back and the app hangs :-(
I'll take another look as soon as I can. Thanks again!
Very nice work. Thanks for sharing.
ReplyDeleteWould be interesting to port this as a #delphi #XE5 #FireMonkey 3D application. it would then run on Windows, Mac, iOS in addition of Android.
Paul, Thanks a lot for you work!
ReplyDeleteFrançois Piette The main significance of this work - its done without failmonkey (fm) - the only stopping barrier from Delphi crossplatform progress and future of Delphi at all! Emb boses didn't get it for more than two years, they even don't see absence of any real apps done with fm.
And we should to ask Paul to do the same work for Windows, Mac, iOS!
By the way François, tons of firemonkey robo-flying-Rubik's Cube's and other useless demos you can find here: http://blogs.embarcadero.com/vsevolodleonov/2013/12/24/mobilegraphicsxe5/
François Piette FireMonkey is not the only way to get crossplatform solution ;) CubeMan3D V2 for XE2..XE5 can be build on Win32/64 MacOS and Android :)
ReplyDeletehttp://cc.embarcadero.com/item/29684
Paul TOTH Thanks again, take a look in pm.
ReplyDeleteActually this is more a demo for OpenGL on different platforms.
ReplyDeleteIt would be interesting to add a button to display a color picker and change CubeMan3D color. I guess it would be difficult using OpenGL but easy using FireMonkey (Which anyway makes use of OpenGL on the mobile Platform).
You wrote nice code. Thanks for sharing.
ReplyDeleteI have a question: Why not having implemented separately your class TGLContext for the 3 platforms instead of having the 3 implémentations mixed with a lot of conditional compilation? You could have a base class with common code for all platforms and 3 specialized classes, one for each Platform, overriding what is required. The result is functionnaly the same but probably easier to read and maintain.
It's a demo of Delphi's capability to compile the same code for different platforms.
ReplyDeleteAnyway, I'm comfortable with OpenGL; FireMonkey is an abstraction level with its own concepts. Look at the LowLevel3D demo, it uses three different shaders to match DirectX9, 10 or GLSL while the same OpenGL code can run on all the platforms including Windows. Firemonkey should allow the programmer to use OpenGL under Windows with a direct access to it's API.
About the code: it's just a demo It show quickly the differences between platforms (except for MacOS that require lot of code in a second unit).
CrossControls (http://cc.embarcadero.com/Item/28968) use a specific sub-unit for each platform.; TControl inherit from TOSControl defined in one of those sub-unit.
Paul TOTH I don't know if it is possible to select which underlying API FireMonkey use Under Windows. I'm almost sure they use DirectX whenever possible because this is the fastest one on Windows et better supported because of the game market.
ReplyDeleteFrançois Piette they wanted to get the fast speed, but got only troubles for themselves and end users - the 3d fmx apps works slower than any OpenGL based app on win.
ReplyDeleteThe exact same song with styles - wanted so they can do everything by styles, and as a result because of the complexities of brakes and glitches that got fmx use about 3.5 developers worldwide and then only with prayers.
Sergionn Rad I don't know for the FMX speed. What I know is that any abstraction layer has a speed impact. This is a trade-off one has to make when using any abstraction layer. If you want to discuss that, please open a new discussion so that Paul's post is not polluted and other can better be attracted by a better subject for that matter.
ReplyDeleteFrançois Piette The person who started talk about fmx in this post WAS YOU - it looks like they ask you for promotion that fail framework so you don't like someone talk about it in bad light or offers alternative solutions as Paul did, shame to you, and mvp like you, by doing that you bring Delphi to full laydown.....
ReplyDeleteVery nice! And thanks for sharing!
ReplyDeleteWe're having a separate discussion about splash screens. This app start at once!!! Even on older devices. I had a quick look to see if it would be possible to use this approach to make a splash screen. Unfortunately once FMX.Forms is added the black screen is back and the app hangs :-(
I'll take another look as soon as I can. Thanks again!
Thanks for sharing.
ReplyDeleteI have port these OpenGL code into FireMonkey TForm3D, but it's can not show the cube man.
Is there any way to combine OpenGL function with FireMonkey TForm or TForm3D ?