Commit 5ac0a0f3 authored by Martok's avatar Martok

[glcShader] Add BindFragDataLocation

parent 0264ee96
......@@ -27,9 +27,10 @@ unit uglcShader;
try
sl.LoadFromFile(aFileName);
so := TglcShaderObject.Create(aType);
so.Code:= sl.Text;
shader.add(so);
finally
FreeAndNil(sl, @LogMessage);
FreeAndNil(sl);
end;
end;
......@@ -146,6 +147,7 @@ type
function GetUniformfv(const aName: String; aP: PGLfloat): Boolean;
function GetUniformfi(const aName: String; aP: PGLint): Boolean;
procedure BindAttribLocation(const aName: String; const aAttribIndex: GLint);
procedure BindFragDataLocation(const aName: String; const aColorIndex: GLint);
function GetAttribLocation(const aName: String): Integer;
function HasUniform(const aName: String): Boolean;
......@@ -771,6 +773,13 @@ begin
glBindAttribLocation(fProgramObj, aAttribIndex, PGLchar(aName));
end;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure TglcShaderProgram.BindFragDataLocation(const aName: String; const aColorIndex: GLint);
begin
CreateProgramObj;
glBindFragDataLocation(fProgramObj, aColorIndex, PGLchar(aName));
end;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function TglcShaderProgram.GetAttribLocation(const aName: String): Integer;
begin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment