end;
PglcMaterialRec = ^TglcMaterialRec;
- TglcLightType = (ltGlobal, ltPoint, ltSpot);
+ TglcLightType = (
+ ltGlobal = 0,
+ ltPoint = 1,
+ ltSpot = 2);
TglcLightRec = packed record
Ambient: TgluVector4f;
Diffuse: TgluVector4f;
fProgramObj: GLHandle;
fOnLog: TglcShaderLogEvent;
fFilename: String;
- fGeometryInputType: GLint;
- fGeometryOutputType: GLint;
- fGeometryVerticesOut: GLint;
function GetUniformLocation(const aName: String; out aPos: glInt): Boolean;
function GetInfoLog(Obj: GLHandle): String;
property Compiled: Boolean read GetCompiled;
property Linked: Boolean read GetLinked;
property OnLog: TglcShaderLogEvent read fOnLog write fOnLog;
- property GeometryInputType: GLint read fGeometryInputType write fGeometryInputType;
- property GeometryOutputType: GLint read fGeometryOutputType write fGeometryOutputType;
- property GeometryVerticesOut: GLint read fGeometryVerticesOut write fGeometryVerticesOut;
procedure Compile;
procedure Enable;
procedure SaveToFile(const aFilename: String);
procedure SaveToStream(const aStream: TStream);
- constructor Create(aLogEvent: TglcShaderLogEvent = nil);
+ constructor Create(const aLogEvent: TglcShaderLogEvent = nil);
destructor Destroy; override;
end;
//@LogEvent: Event zum loggen von Fehlern und Ereignissen;
//@raise: EglcShader wenn OpenGL nicht initialisiert werden konnte;
//@raise:
-constructor TglcShaderProgram.Create(aLogEvent: TglcShaderLogEvent);
+constructor TglcShaderProgram.Create(const aLogEvent: TglcShaderLogEvent);
begin
inherited Create;
fOnLog := aLogEvent;