mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 10:19:20 +02:00
Six module interfaces carry windows.h in their fragment, and a fragment's include guard does not cross the boundary, so a unit that imported first and included the SDK afterwards parsed it twice: clang reports it as conflicting redeclarations of BroadcastSystemMessageEx and mismatched uuids all through the SDK. Same shape as the basic_filebuf failure, one level further out - the header arrives through d3d12.h, not directly. Thirty units get a guarded windows.h ahead of everything; on Linux it is a no-op. Vendored single-header libraries are left alone, and the block goes after a BOM rather than before it.
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
#pragma once
|
|
#ifdef _WIN32
|
|
#include <windows.h> // before any import: its guard must be set here
|
|
#endif
|
|
|
|
#include <cstdint>
|
|
#include <nvrhi/nvrhi.h>
|
|
|
|
import eu07.glm;
|
|
struct MaContactShadows {
|
|
MaContactShadows(class NvRenderer* renderer, class NvGbuffer* gbuffer);
|
|
void Init();
|
|
void Render(nvrhi::ICommandList* command_list);
|
|
void UpdateConstants(nvrhi::ICommandList* command_list,
|
|
const glm::dmat4& projection, const glm::dmat4& view,
|
|
const glm::dvec3& light, uint64_t frame_index);
|
|
|
|
struct ComputeConstants {
|
|
glm::mat4 g_Projection;
|
|
glm::mat4 g_InverseProjection;
|
|
glm::vec3 g_LightDirView;
|
|
float g_NumSamples;
|
|
float g_SampleRange;
|
|
float g_Thickness;
|
|
uint32_t g_FrameIndex;
|
|
};
|
|
|
|
nvrhi::BindingLayoutHandle m_binding_layout;
|
|
nvrhi::BindingSetHandle m_binding_set;
|
|
nvrhi::ComputePipelineHandle m_pipeline;
|
|
nvrhi::ShaderHandle m_compute_shader;
|
|
nvrhi::BufferHandle m_constant_buffer;
|
|
|
|
nvrhi::TextureHandle m_output_texture;
|
|
|
|
class NvRendererBackend* m_backend;
|
|
class NvGbuffer* m_gbuffer;
|
|
int m_width;
|
|
int m_height;
|
|
}; |