home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex172.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
1KB
|
23 lines
// Example: 172 from Library Reference
#include "..\3D-Ware\dddware.h"
// Color 2, 4 points, square clockwise poly.
short PolyCoords[] = {2,4,50,50,100,50,100,100,50,100};
char fname[] = {"pcxpic.pcx"}; // The filename we choose as the output filename.
short main(void)
{
dddLoadColors("EXAMPLE.COL"); // Load in the color palette called 'example.col' to 'standardpal'.
dddInitVideo(); // Sets up video to mode 19 VGA 320*200 256 cols.
dddSetPal(dddstandardpal); // Set up the palette.
dddInit3d(); // MUST be before any calls to 3D libraries !!!
dddCls(); // Clear the graphics screen.
dddScreenSwap(); // Initialise the screen swapping.
dddDrawPoly(PolyCoords); // Draw a polygon to the dummy screen.
dddScreenSwap(); // Flip the real screen and the dummy screen.
dddDrawPoly(PolyCoords); // Draw the polygon to the dummy screen.
dddWritePcx(fname, dddstandardpal); // Write out the contents of the dummy screen which
// logbase is refering to.
dddRestoreVideo(); // Reset video mode to original.
dddClose3d(); // Clean up behind ourselves.
return 0; // Bye.
}