CubeMan3D, an XE5 native OpenGL demonstration for Android


CubeMan3D, an XE5 native OpenGL demonstration for Android
http://cc.embarcadero.com/Item/29682

Comments

  1. Very nice work. Thanks for sharing.

    Would be interesting to port this as a #delphi   #XE5   #FireMonkey   3D application. it would then run on Windows, Mac, iOS in addition of Android.

    ReplyDelete
  2. 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/

    ReplyDelete
  3. 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

    ReplyDelete
  4. Paul TOTH Thanks again, take a look in pm.

    ReplyDelete
  5. 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).

    ReplyDelete
  6. You wrote nice code. Thanks for sharing.
    I 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.

    ReplyDelete
  7. 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.

    ReplyDelete
  8. 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.

    ReplyDelete
  9. 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.

    ReplyDelete
  10. 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.

    ReplyDelete
  11. 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.....

    ReplyDelete
  12. 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!

    ReplyDelete
  13. Thanks for sharing.
    I 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 ?

    ReplyDelete

Post a Comment