Курсовая работа: Управление элементами поверхности
wglDeleteContext(HRC);
ReleaseDC (Handle, DC);
DeleteDC(DC);
end;
procedure TForm1. Timer1Timer (Sender: TObject);
begin
InvalidateRect (Handle, nil, false);
end;
procedure TForm1. TrackBar1Change (Sender: TObject);
begin
Label2. Caption:=floattostr (TrackBar1. Position);
vis:=TrackBar1. Position;
end;
procedure TForm1. FormResize (Sender: TObject);
begin
glViewport (0, 0, ClientWidth-Panel1. Width, ClientHeight);
glMatrixMode (GL_PROJECTION);
glLoadIdentity;
gluPerspective (30.0, ClientWidth / ClientHeight, 0.1, 1000.0);
glMatrixMode (GL_MODELVIEW);
glLoadIdentity;
end;
procedure TForm1. FormPaint (Sender: TObject);
var
ps:TPaintStruct;
Const
LPos: Array [0..3] of GLFloat = (3.0, 10, -100.0, 1.0);
begin
BeginPaint (Handle, ps);