Open ajon542 opened 8 years ago
This appears to occur when exceptions are thrown from Update or Render calls.
This also occurs if a shader compile fails in LoadShader. The exception appears to not have any effect. Having a look at the call stack, the exception is probably caught in SceneInitialized.Execute or any of the other Execute methods.
The above link can be implemented in DelegateCommand.Execute. However, the GameEngineException is crashing the program at home. At work it is not crashing... That is weird.
We are inside an event handler, we probably shouldn't be throwing an exception from within here. If we can't compile the shaders then we need to think of an alternate method to allow the user to fix them. This probably ties more into running the game engine and not running the scene until all shader errors are fixed.
We could even fallback to default shaders that are known to work and warn the user.
I've noticed times when debugging that an exception is thrown or an error occurs somewhere, particularly when compiling or linking shaders and the program continues to run and we get a black screen. I think the project will benefit by assertions when something goes wrong, especially in debug mode.