Display initialization

Can anyone shed some light on exactly when Display is initialized in StandardGame. I'm trying to use a Canvas from a StandardGame implementation but it always complains that Display is null. I've tried a while/wait loop to delay until the main Frame is visible but it still complains that Display is null.

The Display is initialized when you call Start() on your StandardGame. When you call Start() then the thread blocks until it is in the main game loop… so you do not have to do any waiting of your own. The Display is then available by calling either:



myStandardGame.getDisplay();

or…

DisplaySystem.getDisplaySystem();



Sorry, cannot comment on the canvas issue though