locked
BUG: Device Created/Reset etc not called back RRS feed

  • Question

  • The event handlers for Device Created/Reset etc are not called back when they are installed "too late", and that's the case for the SpaceWar sample.

    It seems that it needs to be done before the GraphicsComponent is added to the GameComponents collection.

    Can anyone confirm?
    Friday, September 29, 2006 8:48 PM

Answers

  • This is the intended behavior.

    The GraphicsComponent creates the GraphicsDevice when it is first initialised, and that happens when the component is added to GameComponents.

    If you subscribe to the events later on, the device has already been created, so the events will already have been fired.
    Friday, September 29, 2006 9:26 PM

All replies

  • This is the intended behavior.

    The GraphicsComponent creates the GraphicsDevice when it is first initialised, and that happens when the component is added to GameComponents.

    If you subscribe to the events later on, the device has already been created, so the events will already have been fired.
    Friday, September 29, 2006 9:26 PM
  • Then the spacewar demo game should be fixed...
    Friday, September 29, 2006 9:30 PM