FMX.Types3D.TContext3D.BeginScene

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function BeginScene: Boolean;

C++

bool __fastcall BeginScene(void);

Properties

Type Visibility Source Unit Parent
function public
FMX.Types3D.pas
FMX.Types3D.hpp
FMX.Types3D TContext3D

Description

Notifies the TContext3D object that the drawing can begin.

Call BeginScene before drawing on the TContext3D.

To end the drawing session, call EndScene.

If an application has called BeginScene and BeginScene returns True, then the application must call EndScene. That is, the recommended call pattern should look like this:

if Context3D.BeginScene then
  try
    Context3D.xxx   //drawing image operations
    ...
  finally
    Context3D.EndScene;
  end;

Each time the TContext3D object calls BeginScene and BeginScene returns True, the value of the BeginSceneCount property is increased by one. Each time the TContext3D object calls EndScene, the value of the BeginSceneCount property is decreased by one. BeginScene uses BeginSceneCount to guarantee that the TContext3D object has no more than one initialized drawing at any moment.

See Also