From here on we assume the GLScene library has been installed properly. We are ready to take our first steps into the 3D openGL universe. In GLScene the universe or 3D world is called a scene. Hence the name. We are going to create our first application that will contain a 3D cube. We will learn how to start a basic GLScene application and how to control the layout by manipulating the design time properties.
- Start a new application in Delphi
- Set the form width to 640 and the height to 480

- Go to the GLScene tab on the VCL palette

- Place a TGLScene

and a TGLSceneViewer

viewer on the form

The TGLSceneViewer is the window which will give us a view into the 3D scene we are about to build. The TGLSene is the master of the scene. Everything that happens is managed through the TGLScene control.
Let’s introduce you to the most important dialog in GLScene. The scene editor.
- Right click on the TGLScene
icon on the form and select “Show scene editor”

As a result the scene editor dialog will appear.

The world managed by TGLScene is still a blank canvas. You can add objects such as shapes, camera’s and lights to build your world in this editor.
Let’s start by adding a 3D cube to the scene.
- Right click on
“Scene Objects” and select a “Cube” from “Basic geometry”

You can see there are a lot of objects you can choose from. Leave those for what they are for now. We will visit other objects later in the tutorial.
The popup menu will collapse once you click on the

Cube object. The cube is now added to the scene.

Let’s close the scene editor and check out wat we see.

???? Nothing! Why can’t you see the cube? Well that would be correct. There is a whole bunch of things that need to be considered before you will see anything.
Proceed to the
Make it all work tutorial to sort out the issues.