FMX.Types3D.TContextShader

From RAD Studio API Documentation
Jump to: navigation, search

System.TObjectTContextShader

Delphi

TContextShader = class sealed

C++

class PASCALIMPLEMENTATION TContextShader : /*[[sealed]]*/ public System::TObject

Properties

Type Visibility Source Unit Parent
class public
FMX.Types3D.pas
FMX.Types3D.hpp
FMX.Types3D FMX.Types3D

Description

Encapsulates native shader programs, variable lists, and types for different architectures.

TContextShader defines a context for native shaders for DX9, DX10, OpenGL ARB, and OpenGL ES. TContextShader has methods to load data from a file or a stream and to save data to a file or a stream. Also, a TContextShader can be loaded from an existing data source. Use the GetSourceByArch method to find the source of shaders for a certain architecture.

The shaders can be of two kinds:

  • Vertex shader
  • Pixel shader

The name of a TContextShader is specified through the Name property.

Use TShaderManager to avoid re-creating the same shader multiple times and overloading the GPU.

TContextShader is used to create and define FireMonkey filters, materials and contexts for 3D objects.

See Also