Контрольная работа: Адитивна кольорова модель RGB
SetDCPixelFormat(DC);
hrc := wglCreateContext(DC);
wglMakeCurrent(DC, hrc);
glClearColor (0.5, 0.5, 0.75, 1.0); // цвет фона
glLineWidth (1.5);
glEnable (GL_LIGHTING);
glEnable (GL_LIGHT0);
glEnable (GL_DEPTH_TEST);
glEnable (GL_COLOR_MATERIAL);
glColor3f (1.0, 0.0, 0.0);
quadObj := gluNewQuadric;
ry := 0.0;
tx := 0.0;
end;
procedure TfrmGL.FormDestroy(Sender: TObject);
begin
gluDeleteQuadric (quadObj);
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);