FMX.GUI3d Sample

From RAD Studio Code Examples
Jump to: navigation, search

This sample is a demonstration of how to build 3D Graphical User Interface (GUI) applications.


You can find the GUI3d sample project at:

  • Start | Programs | Embarcadero RAD Studio Alexandria | Samples and then navigate to:
    • CPP\Multi-Device Samples\User Interface\GUI3d
  • Subversion Repository:
    • You can find C++ code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.


The GUI3d sample demonstrates how to build 3D GUI applications. The sample uses a 3D layer that holds a 2D button. The button, which has a TGlow effect attached, enables a float animation.

How to Use the Sample

  1. Navigate to the location given above and open GUI3dCPP.cbproj.
  2. Select the target platform.
  3. Press F9 or choose Run > Run.
  4. Interact with the sample: left-click on the button labeled as Flip to activate the animation.


File in C++ Contains


The project itself.


The main form where the components are located.

GUI3dCPPCH.h, Unit1.cpp

Used to define and implement the sample.


TForm3D1 is the main form that represents the main window of the sample. It contains the following components:


When you run the application, you see a button labeled as Flip. The button has a glow effect attached with the GlowColor property set to Gold. When you click on the button, an OnClick event occurs. The OnClick event animates the 3D layer. The sample uses the AnimateFloat and AnimateFloatDelay methods of the TFmxObject class to define three different animations for the 3D Layer object.


See Also