Книга: DirectX 8 Programming Tutorial

Logging

Logging

I have also added the ability to create a log file, this can prove useful when debugging. I have added to methods to CGame: EnableLogging and WriteToLog. I call EnableLogging in WinMain just after the CGame object has been created, this method clears the current log and enables logging. WriteToLog simply writes text to the log file if logging is enabled. When the program closes down, statistics are also added to the log file. You should notice that the frames per second stat is no higher than your monitor refresh rate, this is due to setting d3dpp.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_ONE. The log file is called "log.txt" and should be in your project folder once the code has been run for the first time.

You should finish up with six rotating cuboids of different sizes and positions (shown below).


Оглавление книги

Оглавление статьи/книги

Генерация: 0.048. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз