- procedure TForm1.Add2DRectangle(XPos, YPos, ZPos, iWidth, iHeight: Extended);
- begin
- glBegin(GL_QUADS);
- glColor4f(1.0, 1.0, 1.0, 1); glVertex3f(XPos, YPos, ZPos);
- glColor4f(1.0, 1.0, 1.0, 1); glVertex3f(XPos + iWidth, YPos, ZPos);
- glColor4f(1.0, 1.0, 1.0, 0.5); glVertex3f(XPos + iWidth, YPos + iHeight, ZPos);
- glColor4f(1.0, 1.0, 1.0, 0.5); glVertex3f(XPos, YPos + iHeight, ZPos);
- glEnd;
- end;