Warning: Undefined array key "translationlc" in /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php on line 237
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php:237) in /usr/www/users/fabook/_diggets/doc/v2/inc/parser/code.php on line 33
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php:237) in /usr/www/users/fabook/_diggets/doc/v2/inc/parser/code.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/fabook/_diggets/doc/v2/lib/plugins/translation/action.php:237) in /usr/www/users/fabook/_diggets/doc/v2/inc/parser/code.php on line 35
unit Gorilla.Material.VertexColor;
interface
uses
System.SysUtils,
System.Classes,
FMX.Types,
FMX.Types3D,
FMX.Materials,
FMX.MaterialSources,
Gorilla.Material.Default;
type
TGorillaVertexColorMaterial = class(TGorillaDefaultMaterial)
protected
procedure DoCreateVertexShader(); override;
procedure DoCreateFragmentShader(); override;
public
end;
TGorillaVertexColorMaterialSource = class(TGorillaDefaultMaterialSource)
protected
function CreateMaterial() : TMaterial; override;
public
end;
implementation
uses
Gorilla.Material.Default.GLSL;
{ TGorillaVertexColorMaterial }
procedure TGorillaVertexColorMaterial.DoCreateVertexShader();
begin
inherited;
VertexShaderNode.AddDefine(GORILLA_GLSL_DEFINE_USE_COLOR);
VertexShaderNode.RemoveDefine(GORILLA_GLSL_DEFINE_USE_TEXTURE);
end;
procedure TGorillaVertexColorMaterial.DoCreateFragmentShader();
begin
inherited;
FragmentShaderNode.AddDefine(GORILLA_GLSL_DEFINE_USE_COLOR);
FragmentShaderNode.RemoveDefine(GORILLA_GLSL_DEFINE_USE_TEXTURE);
end;
{ TGorillaVertexColorMaterialSource }
function TGorillaVertexColorMaterialSource.CreateMaterial() : TMaterial;
begin
Result := TGorillaVertexColorMaterial.Create(Self);
end;
end.