Includes
Header files
Includes in the source file should go in the following order:
- System includes and standard headers
- Diligent Engine interface headers
- Header for the base object implementation, if any
- Headers of the object implementations
- Other headers required by this header file
Example:
#include <unordered_map>
#include <vector>
#include "DeviceContextNextGenBase.hpp"
#include "D3D12DynamicHeap.hpp"
#include "D3D12DynamicHeap.hpp"
Source files
Includes in the source file should go in the following order:
- Precompiled header (if any)
- The source file's header
- System includes and standard headers
- Diligent Engine interface headers
- Headers of the object implementations
- Other headers required by this source file
Example:
#include "pch.h"
#include <sstream>
#include "RenderDeviceD3D12.hpp"
#include "DeviceContextD3D12.hpp"
#include "CommandContext.hpp"
#include "d3dx12_win.h"
#include "D3D12DynamicHeap.hpp"
When there is more than one header in each group, it is recommended to separate the groups with blank lines.
Exceptions
Naming conventions
Debug macros