Контрольная работа: Концепції програмування. Графічна система OpenGL
ry: = ry - 2.0;
InvalidateRect (Handle, nil, False);
end;
If Key = VK_UP then begin
tx: = tx - 0.1;
InvalidateRect (Handle, nil, False);
end;
If Key = VK_DOWN then begin
tx: = tx + 0.1;
InvalidateRect (Handle, nil, False);
end;
If Key = 49 then begin
mode: = POINT;
InvalidateRect (Handle, nil, False);
end;
If Key = 50 then begin
mode: = LINE;
InvalidateRect (Handle, nil, False);
end;
If Key = 51 then begin
mode: = FILL;
InvalidateRect (Handle, nil, False);
end;
end;
procedure TfrmGL. FormResize (Sender: TObject);
begin
glViewport (0, 0, ClientWidth, ClientHeight);
glMatrixMode (GL_PROJECTION);
glLoadIdentity;