Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiDemoFiremonkeyIOSOSXWindows

OpenGL 3D Animation Demos For Delphi XE5 Firemonkey On Android And IOS

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE5 Firemonkey 3D Animation | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSPaul Toth has two different demos up that are good examples of how to build, animate, and render something using primitives in Delphi XE5 Firemonkey. The first demo was built to use low level OpenGL APIs directly and it actually loads the OpenGL library for each different platform and then does everything manually. It is a good example however of the power of Delphi to get at low level APIs and use them when you need to. The first demo supports Windows, OSX, and Android but not IOS (though support could be added). The first demo is 907 lines of code in it’s main file. You can download this demo here and it also includes binaries for each platform. Here is some sample code from that demo showing the import of the OpenGL libraries:
{$IFDEF Android}
OpenGL = '/usr/lib/';
Prefix = '';

OpenGL = 'OpenGL32.DLL';

OpenGL = '/System/Library/Frameworks/OpenGL.framework/OpenGL';
Prefix = '_';

The second demo that he built does pretty much the same thing except it was built entirely out of TRoundCube primitives and animated with TFrameAnimation using the Delphi XE5 visual editor. There is not a single low level API called that had to be written because Firemonkey took care of it all behind the scenes. The main project file for the second demo is 84 lines of code (or about a 90% reduction of code from the first project). The second demo I am assuming runs on Windows, Android, IOS, and OSX out of the box because it is just Firemonkey. You can download the second demo here.

How much more can you get done in a day when you can write ~90% less code to accomplish the same goal? These two projects are a perfect example of why the component based culture of Delphi Firemonkey is a force multiplier for cross platform development on the desktop and mobile devices.

Fran├žois Piette has a blog post up about the two projects which you can click over and read.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

Unleashing Creativity With Song Writer AI: A Deep Dive


How To Build Stable Diffusion Text To Image Prompts


FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes


Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores

Sign up for our Newsletter and
stay informed

Leave a Reply