What's with the polymode call.....
Eric H. Echidna
echidna at ecr.mu.oz.au
Fri Jun 7 15:52:25 AEST 1991
We recently had some code that made use of the 'polymode' call
to change the way various polygons were being filled. It didn't have
ant effect at all. This is on a PI 4D25. Here is an example that doesn't
work....what's up?
#include <gl.h>
#include <device.h>
main()
{
short val;
prefsize(700, 700);
winopen("test1");
unqdevice(INPUTCHANGE);
qdevice(KEYBD);
viewport(0, 600, 0, 500);
ortho2(0.0, 600.0, 0.0, 500.0);
color(CYAN);
clear();
color(RED);
/*
* manual says that rectf is effected by polymode - it don't work
*/
polymode(PYM_LINE);
rectf(100.0, 100.0, 400.0, 400.0);
(void)qread(&val);
color(CYAN);
clear();
color(GREEN);
/*
* manual says that pmv/pdr/pclos is effected by polymode -
* it don't work
*/
polymode(PYM_LINE);
pmv2(100.0, 100.0);
pdr2(100.0, 400.0);
pdr2(400.0, 400.0);
pdr2(400.0, 100.0);
pclos();
(void)qread(&val);
color(CYAN);
clear();
color(GREEN);
polymode(PYM_POINT);
pmv2(100.0, 100.0);
pdr2(100.0, 400.0);
pdr2(400.0, 400.0);
pdr2(400.0, 100.0);
pclos();
(void)qread(&val);
}
More information about the Comp.sys.sgi
mailing list