Статья: OpenGL и Delphi на практике
TForm1 = class(TForm)
Timer1: TTimer;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure FormPaint(Sender: TObject);
procedure FormResize(Sender: TObject);
private
RC:HGLRC;
DC:HDC;
H:THandle;
procedure BeginPaint;
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
const mat1_dif:Array[0..2] of Single = (0.8,0.8,0.0);
const mat1_amb:Array[0..2] of Single = (0.2,0.2,0.2);
const mat1_spec:Array[0..2] of Single = (0.6,0.6,0.6);
const mat1_shininess = 0.5*128;
procedure DrawElement(A,b,R0,r1:Single);
procedure DrawFace(A,R:Single;Normal:Boolean);
implementation