CommonLibSSE NG
Loading...
Searching...
No Matches
Renderer.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/N/NiTexture.h"
7
8struct ID3D11Device;
9struct ID3D11DeviceContext;
10struct IDXGISwapChain;
11struct ID3D11RenderTargetView1;
12struct ID3D11ShaderResourceView1;
13
14namespace RE
15{
16 namespace BSGraphics
17 {
19 {
20 public:
21 // members
23 std::int32_t windowX; // 08
24 std::int32_t windowY; // 0C
25 std::int32_t windowWidth; // 10
26 std::int32_t windowHeight; // 14
27 IDXGISwapChain* swapChain; // 18
29 std::uint32_t unk24; // 24
30 std::uint64_t unk28; // 28
31 ID3D11RenderTargetView1* renderView; // 30
32 ID3D11ShaderResourceView1* resourceView; // 38
33 std::uint64_t unk40; // 40
34 std::uint64_t unk48; // 48
35 };
36 static_assert(sizeof(RendererWindow) == 0x50);
37
39 {
40 public:
41 // members
42 std::uint32_t uiAdapter; // 0000
43 std::uint32_t unk04; // 0004 - refreshRate?
44 std::uint32_t unk08; // 0008
45 std::uint32_t unk0C; // 000C
46 std::uint32_t unk10; // 0010
47 std::uint32_t unk14; // 0014
48 std::uint32_t unk18; // 0018
49 std::uint32_t unk1C; // 001C
50 bool fullScreen; // 0020
51 bool borderlessDisplay; // 0021
52 bool readOnlyDepth; // 0022
53 std::uint8_t unk23; // 0023
54 std::uint8_t unk24; // 0024
55 std::uint32_t unk28; // 0028
56 std::uint32_t unk30; // 0030
57 std::uint32_t presentInterval; // 0034
58 ID3D11Device* forwarder; // 0038
59 ID3D11DeviceContext* context; // 0040
61 RenderTargetData renderTargets[RENDER_TARGET::kTOTAL]; // 0A48
62 DepthStencilData depthStencils[RENDER_TARGET_DEPTHSTENCIL::kTOTAL]; // 1FA8
63 CubemapRenderTargetData cubemapRenderTargets[RENDER_TARGET_CUBEMAP::kTOTAL]; // 26C8
64 Texture3DTargetData texture3DRenderTargets[RENDER_TARGET_3D::kTOTAL]; // 2708
65 float clearColor[4]; // 2768
66 std::uint8_t clearStencil; // 2778
68 const char* className; // 27A8
70 };
71 static_assert(offsetof(RendererData, lock) == 0x2780);
72
74 {
75 public:
76 [[nodiscard]] static Renderer* GetSingleton() noexcept;
77
78 [[nodiscard]] NiTexture::RendererData* CreateRenderTexture(std::uint32_t a_width, std::uint32_t a_height);
79 void SaveRenderTargetToFile(RENDER_TARGET a_renderTarget, const char* a_filePath, TextureFileFormat a_textureFileFormat);
80
81 // members
82 std::uint64_t unk00; // 00
83 std::uint64_t unk08; // 08
85 };
86 }
87}
Definition Renderer.h:74
std::uint64_t unk08
Definition Renderer.h:83
std::uint64_t unk00
Definition Renderer.h:82
NiTexture::RendererData * CreateRenderTexture(std::uint32_t a_width, std::uint32_t a_height)
RendererData data
Definition Renderer.h:84
static Renderer * GetSingleton() noexcept
void SaveRenderTargetToFile(RENDER_TARGET a_renderTarget, const char *a_filePath, TextureFileFormat a_textureFileFormat)
Definition NiTexture.h:15
TextureFileFormat
Definition TextureFileFormat.h:8
Definition AbsorbEffect.h:6
HWND__ * HWND
Definition WinAPI.h:75
HINSTANCE__ * HINSTANCE
Definition WinAPI.h:78
Definition ActorValueList.h:28
Definition RenderTargetData.h:35
Definition RenderTargetData.h:25
Definition RenderTargetData.h:14
Definition Renderer.h:39
std::uint32_t unk08
Definition Renderer.h:44
bool readOnlyDepth
Definition Renderer.h:52
DepthStencilData depthStencils[RENDER_TARGET_DEPTHSTENCIL::kTOTAL]
Definition Renderer.h:62
std::uint32_t unk1C
Definition Renderer.h:49
std::uint32_t unk04
Definition Renderer.h:43
SKSE::WinAPI::CRITICAL_SECTION lock
Definition Renderer.h:67
std::uint8_t clearStencil
Definition Renderer.h:66
RenderTargetData renderTargets[RENDER_TARGET::kTOTAL]
Definition Renderer.h:61
const char * className
Definition Renderer.h:68
bool borderlessDisplay
Definition Renderer.h:51
std::uint32_t unk18
Definition Renderer.h:48
float clearColor[4]
Definition Renderer.h:65
std::uint32_t unk10
Definition Renderer.h:46
bool fullScreen
Definition Renderer.h:50
std::uint32_t unk0C
Definition Renderer.h:45
std::uint8_t unk23
Definition Renderer.h:53
std::uint8_t unk24
Definition Renderer.h:54
std::uint32_t unk30
Definition Renderer.h:56
std::uint32_t unk14
Definition Renderer.h:47
Texture3DTargetData texture3DRenderTargets[RENDER_TARGET_3D::kTOTAL]
Definition Renderer.h:64
RendererWindow renderWindows[32]
Definition Renderer.h:60
SKSE::WinAPI::HINSTANCE hInstance
Definition Renderer.h:69
std::uint32_t unk28
Definition Renderer.h:55
ID3D11DeviceContext * context
Definition Renderer.h:59
std::uint32_t uiAdapter
Definition Renderer.h:42
ID3D11Device * forwarder
Definition Renderer.h:58
CubemapRenderTargetData cubemapRenderTargets[RENDER_TARGET_CUBEMAP::kTOTAL]
Definition Renderer.h:63
std::uint32_t presentInterval
Definition Renderer.h:57
Definition Renderer.h:19
ID3D11ShaderResourceView1 * resourceView
Definition Renderer.h:32
RENDER_TARGET swapChainRenderTarget
Definition Renderer.h:28
std::int32_t windowY
Definition Renderer.h:24
ID3D11RenderTargetView1 * renderView
Definition Renderer.h:31
SKSE::WinAPI::HWND hWnd
Definition Renderer.h:22
std::uint64_t unk28
Definition Renderer.h:30
std::uint64_t unk40
Definition Renderer.h:33
std::uint64_t unk48
Definition Renderer.h:34
std::int32_t windowX
Definition Renderer.h:23
IDXGISwapChain * swapChain
Definition Renderer.h:27
std::int32_t windowWidth
Definition Renderer.h:25
std::uint32_t unk24
Definition Renderer.h:29
std::int32_t windowHeight
Definition Renderer.h:26
Definition RenderTargetData.h:43
RENDER_TARGET
Definition BSShaderRenderTargets.h:8
Definition WinAPI.h:42