Контрольная работа: 3D-формати і їх застосування
glEnable (GL_DEPTH_TEST);
glEnable (GL_COLOR_MATERIAL);
glColor3f (1.0, 0.0, 0.0);
ry := 0.0;
tx := 0.0;
mx:=10;
my:=10;
end;
procedure TfrmGL.FormDestroy(Sender: TObject);
begin
wglMakeCurrent(0, 0);
wglDeleteContext(hrc);
ReleaseDC (Handle, DC);
DeleteDC (DC);
end;
procedure TfrmGL.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If Key = VK_ESCAPE then Close;
If Key = VK_LEFT then begin
ry := ry + 2.0;
InvalidateRect(Handle, nil, False);
end;
If Key = VK_RIGHT then begin
ry := ry - 2.0;
InvalidateRect(Handle, nil, False);
end;
If Key = VK_UP then begin
tx := tx - 0.1;