17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 07:29:20 +02:00
Files
maszyna/betterRenderer/renderer/source/gbuffer.h
maj00r 26501b0fd7 hoist standard includes above everything else
Ordering them before the imports in the same file was not enough: a
project header on line 1 can import a module several levels down whose
global module fragment already pulled in the same standard header, and
that include guard does not cross the module boundary. Putting them
first means the guard is set before anything can import.

Skips vendored single-header libraries and anything inside an #if.
2026-09-10 01:02:17 +02:00

30 lines
922 B
C++

#pragma once
#include <cstdint>
#include <vector>
#include <nvrhi/nvrhi.h>
struct NvGbuffer {
NvGbuffer(class NvRenderer* renderer);
void Init(int width, int height, bool is_cube, bool depth_only = false, int slices = 1);
void Clear(nvrhi::ICommandList* command_list);
nvrhi::TextureHandle m_gbuffer_diffuse;
nvrhi::TextureHandle m_gbuffer_emission;
nvrhi::TextureHandle m_gbuffer_normal;
nvrhi::TextureHandle m_gbuffer_params;
nvrhi::TextureHandle m_gbuffer_motion;
nvrhi::TextureHandle m_gbuffer_depth;
nvrhi::FramebufferHandle m_framebuffer;
std::vector<nvrhi::FramebufferHandle> m_slice_framebuffers;
class NvRendererBackend* m_backend;
bool m_depth_only;
static void ClearDepthStencilAttachment(nvrhi::ICommandList* commandList,
nvrhi::IFramebuffer* framebuffer,
float depth, uint32_t stencil);
};