Книга: 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).
- Logging In and Shutting Down
- Logging In to and Working with Linux
- Logging Out
- Logging In and Out from a Remote Computer
- Configure System Logging
- Enabling and disabling event logging
- Using debug logging to track DNS activity
- HTML Logging
- Chapter 6. Traversing of tables and chains
- Chapter 8. Saving and restoring large rule-sets
- Chapter 11. Iptables targets and jumps
- 1.2.2 ROM