Record TGLSLUniform
Unit
CastleGLShaders
Declaration
type TGLSLUniform = record
Description
Overview
Fields
Methods
class function NotExisting: TGLSLUniform; static; |
procedure SetValue(const Value: boolean ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TGLint ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TVector2Integer; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TVector3Integer; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TVector4Integer; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TGLfloat ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TVector2 ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TVector3 ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TVector4 ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TMatrix2 ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TMatrix3 ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TMatrix4 ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TBooleanList; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TLongIntList; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TSingleList ; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TVector2List; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TVector3List; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TVector4List; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TMatrix3List; const ForceException: boolean = false); overload; |
procedure SetValue(const Value: TMatrix4List; const ForceException: boolean = false); overload; |
Description
Fields
Methods
procedure SetValue(const Value: boolean ; const ForceException: boolean = false); 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).
In this case of this method, you cannot get EGLSLUniformNotFound exception (it will be raised earlier, at TGLSLProgram.Uniform).
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.
|
procedure SetValue(const Value: TGLint ; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TVector2Integer; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TVector3Integer; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TVector4Integer; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TGLfloat ; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TVector2 ; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TVector3 ; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TVector4 ; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TMatrix2 ; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TMatrix3 ; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TMatrix4 ; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TBooleanList; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TLongIntList; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TSingleList ; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TVector2List; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TVector3List; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TVector4List; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TMatrix3List; const ForceException: boolean = false); overload; |
|
procedure SetValue(const Value: TMatrix4List; const ForceException: boolean = false); overload; |
|
Generated by PasDoc 0.15.0.
|