unit renderers_3D_implementation;

interface

uses renderers_3D;

type
  T3DRenderer = class(TInterfacedObject, I3DRenderer, IInterface)
  private
    fFramebuffer : TFramebufferInfo;
    fDepthbuffer : IImage; { TFramebufferInfo; }
  public
    destructor Destroy; override;
  published
    constructor Create(const aFramebuffer : TFramebufferInfo);

    { vertices are counter-clockwise. }
    procedure DrawTriangle(const aVertices : TTriangleVertices); overload;
    procedure DrawTriangle(const aVertex0, aVertex1, aVertex2 : TVertex); overload;
    procedure DrawTriangle(const aVertex0 : TVertex; const aTexturePoint0 : TTexturePoint;
                           const aVertex1 : TVertex; const aTexturePoint1 : TTexturePoint;
                           const aVertex2 : TVertex; const aTexturePoint2 : TTexturePoint); overload;

    property Texture : ITexture;
    property IsDepthBufferEnabled : Boolean default true;
    // TODO second Texture.
    // TODO light map.
    // TODO mip mapping.
  end;

implementation
end.
