O'Reilly logo

Expert Delphi by Paweł Głowacki

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starfield simulation

In this section, we will be looking into building efficient 3D visualizations that use multiple geometries. We will create a starfield simulation using TSphere and TObjectProxy components for sharing mesh data.

If we look into the source code of TSphere, TCone, TCylinder and other components in the FMX.Objects3D unit, we will see that their vertices and indices are hardcoded. If we want to build a 3D scene with many different objects, every object will occupy quite a lot of space in memory.

FireMonkey comes with a special TProxyObject 3D object. It does not hold its geometry, but instead has the SourceObject property that can be used to connect to any other 3D object which is used for rendering. In this way, we have just ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required