A Graphics Magician "hello" program
// basic "hello" program
#include "GraphicsMagician.h"
int main()
{
Machine.Start();
cout << "Hello!" << endl;
getch(); // pause for a keypress
return 0;
}
Explanation:
(1) You do not include iostream since Windows doesn't use cin and cout. We trick it into thinking it does. Include "GraphicsMagician.h" instead of iostream.
(2) Use Machine.Start() as the first instruction of your program to initialize DirectX and the virtual graphics machine. See the GMMachine documentation for variations of the start function for full screen or windowed mode and for changing screeen resolution.
(3) Any additional function prototypes go after #include "GraphicsMagician.h" and before int main(). The function definitions go at the end, as usual.