Direct use of Context3D
Similar to FireMonkey 2D architecture, there are two possible approaches to 3D rendering. We can render in code or use reusable components. The first path is what is used by many other programming languages and development environments, and it is what we are going to cover in the first part of this chapter. The main issue is that the more complex and sophisticated our 3D visualization is, the more complex our 3D rendering code becomes.
Using rapid application development with components very quickly pays off as we typically do not need to write too much code to build a great user experience with interactive 3D worlds. This is what we are going to focus on later in the chapter.
As mentioned, the main interface for calling 3D APIs in a cross-platform way in FireMonkey is the TContext3D
class. For this reason, let’s start by building a simple project that is going to use the TContext3D
class directly in code.
The starting point is to create a new...