Page 12/36
you want to do any calculations related to time you have to include this parameter in your equations.
For example if you want to move a cube along X axes with speed of 10 units per second. The
formula would be like this: Position.X:=Position.X + 10 * deltaTime.
Cadencer has enabled property. You ca simply turn cadencer on and off. When it is turned
off the scene will freeze. There are also several modes cadencer can run in. cmASAP is the default
mode and it will progress the scene whenever it can giving it the highest priority. cmIdle will
progress scene only when other processes are finished and with cmManual the scene will only
progress when you make it to do so. Another interesting feature is minDeltaTime. If you set value
for minDeltaTime the scene will not progress until that time has passed even if all rendering is done.
This can give some rest for the system. maxDeltaTime on the other hand will not allow the cadencer
to run faster then specified.
GLGuiLayout
GUI stands for graphical user interface. The purpose of GUI components is to create
2D window controllers well known from Delphi forms, panels, labels, check boxes etc. In GUI
manager you specify GUI layout which is a file with .layout extension created with GUI editor. This
layout specifies regions on a bitmap which is used for the graphic output. This topic will be covered
in more detail later in GUI objects chapter.
GLBitmapFont
You can display 2D text with TGLBitmapFont. This component is used together with
TGLHUDText. You have to load a bitmap that contains letters arranged in rows and columns. The
letters must be on black background for correct transparency. Ranges property specifies which
regions of the bitmap correspond to which letter. Each range has width and length in pixels of the
letter together with starting and ending character in alphabet in ASCII standard. Bitmap font will
create array of textures each representing one character. TGLHUDText can read these textures and
display words. Disadvantage of TGLBitmapFont is that all the letters must have same width. I is
same wide as M. The advantage is that you can make a bitmap you like with colored characters
and different transparency.
GLWindowsBitmapFont
If you dont want to bother with making the bitmap you can use existing Windows font.
You just select Font property and TGLWindowsBitmapFont will create all textures for
TGLHUDText. With this component any true type fonts will be displayed correctly but you have to
use some common fonts that will most likely be installed on the target computer.
GLStoredBitmapFont
This is the third and in my opinion the most useful font component in GLScene. You
can distribute your font with the application saved in .glsf file. This file is created with [TODO]
very easily from any Windows font. This way you can use some more exotic fonts and you do not
have to worry if they are installed on other computers or not. Both TGLWindowsBitmapFont and
TGLStoredFont cant have characters with different colors. You can only change a color as a whole.
GLScriptLibrary
[TODO]
GLSoundLibrary
GLScene is not only great for graphics you can also add 3D sound to your applications.
GLScene beginner's guide, Jan Zizka, 2005