Контрольная работа: Адитивна кольорова модель RGB
INSIDE : gluQuadricOrientation (quadObj, GLU_INSIDE);
OUTSIDE : gluQuadricOrientation (quadObj, GLU_OUTSIDE);
end;
case normals of
NONE : gluQuadricNormals (quadObj, GLU_NONE);
FLAT : gluQuadricNormals (quadObj, GLU_FLAT);
SMOOTH : gluQuadricNormals (quadObj, GLU_SMOOTH);
end;
case gluobj of
SPHERE : gluSphere (quadObj, 1.5, 10, 10);
CONE : gluCylinder (quadObj, 0.0, 1.0, 1.5, 10, 10);
CYLINDER : gluCylinder (quadObj, 1.0, 1.0, 1.5, 10, 10);
DISK : gluDisk (quadObj, 0.0, 1.5, 10, 5);
end;
glPopMatrix;
SwapBuffers(DC);
end;
procedure SetDCPixelFormat (hdc : HDC);
var
pfd : TPixelFormatDescriptor;
nPixelFormat : Integer;
begin
FillChar (pfd, SizeOf (pfd), 0);
pfd.dwFlags := PFD_DRAW_TO_WINDOW or PFD_SUPPORT_OPENGL or PFD_DOUBLEBUFFER;
nPixelFormat := ChoosePixelFormat (hdc, @pfd);
SetPixelFormat (hdc, nPixelFormat, @pfd);
end;
procedure TfrmGL.FormCreate(Sender: TObject);
begin