Something is not going to work.
Your Initialize() method is returning an integer. 'SUCCEEDED' don't check that.
You can do this:
if( engine.Initialize() ) // this automatically gives a 0 == true
{
engine.ProgramLoop();
}
Or you can do this:
HRESULT Initialize()
{
HRESULT hr;
// Initialize the engine
return hr;
}
Got some questions with that.
as you could see i did try { } catch { }
so if it wasn't succesfull it would go to quitwithError(), witch will exit the programm, so if it returns a value it must be a succsessfull creation.
and I tried adding the HRESULT, but it say's that is wasn't initialized
But i wouldn't know what value to put in the hr.
[quote name='Koenig, Frederick']"We tend to forget that happiness doesn't come as a result of getting something we don't have, but rather of recognizing and appreciating what we do have"[/quote]