Контрольная работа: Адитивна кольорова модель RGB
procedure FormResize(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
private
DC : HDC;
hrc: HGLRC;
ry : GLfloat;
tx : GLfloat;
quadObj : GLUquadricObj;
end;
var
frmGL: TfrmGL;
mode : (POINT, LINE, FILL, SILHOUETTE) = FILL;
gluobj : (SPHERE, CONE, CYLINDER, DISK) = SPHERE;
orientation : (OUTSIDE, INSIDE) = OUTSIDE;
normals : (NONE, FLAT, SMOOTH) = SMOOTH;
implementation
{$R *.DFM}
procedure TfrmGL.FormPaint(Sender: TObject);
begin
glClear (GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); // очистка буфера цвета
glPushMatrix;
glRotatef (ry, 0.0, 1.0, 0.0);
glTranslatef (tx, 0.0, 0.0);
case mode of
POINT : gluQuadricDrawStyle (quadObj, GLU_POINT);
LINE : gluQuadricDrawStyle (quadObj, GLU_LINE);
FILL : gluQuadricDrawStyle (quadObj, GLU_FILL);
SILHOUETTE : gluQuadricDrawStyle (quadObj, GLU_SILHOUETTE);
end;