unit Alias1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Transfrm, cOpenGL,OpenGL;

type
  TForm1 = class(TForm)
    OpenGL1: TOpenGL;
    Transform1: TTransform;
    procedure FormCreate(Sender: TObject);
    procedure FormPaint(Sender: TObject);
    procedure FormResize(Sender: TObject);
    procedure Transform1Paint(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin
  glLineWidth(2.0);
  glColor3f(0.0,0.0,0.0);
  {
  glEnable(GL_LINE_SMOOTH);
  glEnable(GL_BLEND);
  glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
  }
end;

procedure TForm1.FormResize(Sender: TObject);
begin
  if OpenGL1.Smaller then
    FormPaint(Sender);
end;

procedure TForm1.FormPaint(Sender: TObject);
begin
  glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
  Transform1.Apply;
  glFlush;
  OpenGL1.ErrorCheck('FormPaint');
end;

procedure TForm1.Transform1Paint(Sender: TObject);
begin
  glBegin(GL_LINES);
    glVertex3f(0.0,1.0,-2.2);
    glVertex3f(0.2,0.0,-2.2);
  glEnd;
end;


end.
 