Record TGLSLUniform

Unit

Declaration

type TGLSLUniform = record

Description

GLSL uniform provides information to shader that is constant for a given shader execution.

Source: base_rendering/castleglshaders.pas (line 126).

Overview

Fields

Public Owner: TGLSLProgram;
Public Name: string;
Public Location: TGLUniformLocation;

Methods

Public class function NotExisting: TGLSLUniform; static;
Public procedure SetValue(const Value: boolean ); overload;
Public procedure SetValue(const Value: TGLint ); overload;
Public procedure SetValue(const Value: TVector2Integer); overload;
Public procedure SetValue(const Value: TVector3Integer); overload;
Public procedure SetValue(const Value: TVector4Integer); overload;
Public procedure SetValue(const Value: TGLfloat ); overload;
Public procedure SetValue(const Value: TVector2 ); overload;
Public procedure SetValue(const Value: TVector3 ); overload;
Public procedure SetValue(const Value: TVector4 ); overload;
Public procedure SetValue(const Value: TMatrix2 ); overload;
Public procedure SetValue(const Value: TMatrix3 ); overload;
Public procedure SetValue(const Value: TMatrix4 ); overload;
Public procedure SetValue(const Value: TBooleanList); overload;
Public procedure SetValue(const Value: TInt32List ); overload;
Public procedure SetValue(const Value: TSingleList ); overload;
Public procedure SetValue(const Value: TVector2List); overload;
Public procedure SetValue(const Value: TVector3List); overload;
Public procedure SetValue(const Value: TVector4List); overload;
Public procedure SetValue(const Value: TMatrix3List); overload;
Public procedure SetValue(const Value: TMatrix4List); overload;

Description

Fields

Public Owner: TGLSLProgram;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 128).

Public Name: string;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 129).

Public Location: TGLUniformLocation;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 130).

Methods

Public class function NotExisting: TGLSLUniform; static;

Calling TGLSLUniform.SetValue of this is ignored.

Source: base_rendering/castleglshaders.pas (line 133).

Public procedure SetValue(const Value: boolean ); overload;

Set uniform variable value. You should get the uniform information first using the TGLSLProgram.Uniform call. All the documentation for TGLSLProgram.SetUniform applies also here, so the program must be linked, and enabled (it will be enabled automatically by calling this).

This method always ignores a missing uniform. Rely on TGLSLProgram.Uniform to make something else (like make a warning).

The TGLSLUniform information about a given uniform stays constant while the program is linked. Using the TGLSLProgram.Uniform one time, and then repeatedly calling TGLSLUniform.SetValue, is faster than repeatedly calling TGLSLProgram.SetUniform. Because the latter will effectively call TGLSLProgram.Uniform every time, which may have non-zero cost.

Actually, the uniform location (TGLSLUniform.Location) is constant for a given program, and you can even predict the location in some cases without calling TGLSLProgram.Uniform method (see GLSL reference). So it can be even faster, as you can prepare correct TGLSLUniform instance in your own code, without calling TGLSLProgram.Uniform.

Source: base_rendering/castleglshaders.pas (line 157).

Public procedure SetValue(const Value: TGLint ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 158).

Public procedure SetValue(const Value: TVector2Integer); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 159).

Public procedure SetValue(const Value: TVector3Integer); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 160).

Public procedure SetValue(const Value: TVector4Integer); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 161).

Public procedure SetValue(const Value: TGLfloat ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 162).

Public procedure SetValue(const Value: TVector2 ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 163).

Public procedure SetValue(const Value: TVector3 ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 164).

Public procedure SetValue(const Value: TVector4 ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 165).

Public procedure SetValue(const Value: TMatrix2 ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 166).

Public procedure SetValue(const Value: TMatrix3 ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 167).

Public procedure SetValue(const Value: TMatrix4 ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 168).

Public procedure SetValue(const Value: TBooleanList); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 170).

Public procedure SetValue(const Value: TInt32List ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 171).

Public procedure SetValue(const Value: TSingleList ); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 172).

Public procedure SetValue(const Value: TVector2List); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 173).

Public procedure SetValue(const Value: TVector3List); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 174).

Public procedure SetValue(const Value: TVector4List); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 175).

Public procedure SetValue(const Value: TMatrix3List); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 176).

Public procedure SetValue(const Value: TMatrix4List); overload;

This item has no description.

Source: base_rendering/castleglshaders.pas (line 177).


Generated by PasDoc 0.17.0.snapshot.