I'll get those fonts John, thanks. I was able to fix the font problem by avoiding "courier" and specifying "roman" instead. It probably did not know what Roman was but came up with a good looking monospaced font instead a scrambled Courier.
Peter,
Your test code above did not work correctly in Linux, partly due to the Courier font, and dumped all its pixels onto the desktop at the end. But here are compatible versions of the magic square and the 3d demo.
I made a number of changes to Func.inc.
1 Replace peekMessage with GetMessage. This eliminates frenetic looping.
2 Call a render() procedure from wndproc on the WM_PAINT message.
3 Respond to the WM_ERASEBKGND message returning 1. This maintains a clean window when moving.
On the App side.
1 provide render() procedure that can be called from WndProc (on WM_PAINT message).
2 bypass rendering when there is no user activity (the act flag)
3 sleep for 10ms instead
I am sure the logic controlling the keydown, buttondown and act flags can be improved. They reduce CPU activity to almost nil when the user is not interacting.
Charles
PS: the Magic square needs the media folder (not included)
.