Skip to main content
added 242 characters in body
Source Link
bobobobo
  • 17.2k
  • 10
  • 67
  • 99

The basic way to do this is just call repaint() when a region of the window is invalidated.

You would trigger a repaint whenever the user performs a GUI action that requires the viewport to be re-rendered.

An old way to write a game in a C# native window (which you don't do now! you use XNA!) is to basically call invalidate at the end of each paint event. This makes for a pretty continuous (but not ideally performing) "game loop".

The GUI and 3D rendering representation generally run on the same thread, so there are no threading issues. Data processing jobs (such as rendering) can be performed on separate worker threads, and they report back to the main thread when they are done.

The basic way to do this is just call repaint() when a region of the window is invalidated.

You would trigger a repaint whenever the user performs a GUI action that requires the viewport to be re-rendered.

An old way to write a game in a C# native window (which you don't do now! you use XNA!) is to basically call invalidate at the end of each paint event. This makes for a pretty continuous (but not ideally performing) "game loop".

The basic way to do this is just call repaint() when a region of the window is invalidated.

You would trigger a repaint whenever the user performs a GUI action that requires the viewport to be re-rendered.

An old way to write a game in a C# native window (which you don't do now! you use XNA!) is to basically call invalidate at the end of each paint event. This makes for a pretty continuous (but not ideally performing) "game loop".

The GUI and 3D rendering representation generally run on the same thread, so there are no threading issues. Data processing jobs (such as rendering) can be performed on separate worker threads, and they report back to the main thread when they are done.

Source Link
bobobobo
  • 17.2k
  • 10
  • 67
  • 99

The basic way to do this is just call repaint() when a region of the window is invalidated.

You would trigger a repaint whenever the user performs a GUI action that requires the viewport to be re-rendered.

An old way to write a game in a C# native window (which you don't do now! you use XNA!) is to basically call invalidate at the end of each paint event. This makes for a pretty continuous (but not ideally performing) "game loop".