FMX.Mobile.LowLevel3D Sample (C++)
This sample illustrates basic usage of low level 3D objects in mobile applications, using FireMonkey.
You can find the FireMonkeyMobile LowLevel3D sample project at:
- Start | Programs | Appmethod 1.16 | Samples and then navigate to CPP\Mobile Samples\User Interface\LowLevel3D
- Subversion Repository: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE8//CPP/Mobile%20Samples/User%20Interface/LowLevel3D
This application defines a new Material using two predefined bitmaps and a random color. The new material is used to render a rotating rectangular shape within the 3D context of the application form.
How to Use the Sample
- Navigate to the location given above and open LowLevel3D.cbproj.
- Press F9 or choose Run > Run.
Notice the animated rectangular shape with the customized material.
- TForm1 represents the main window of the sample. It contains the following:
- TMyMaterial class defines the new material.
- The new material is defined using low-level classes to manage graphical shaders: TContextShaderSource, TShaderManager, TContextShaderVariable. The rectangle shape and the new material are created on the OnRender event of the form.
- The drawing process is made through the TContext3D associated to the TForm.