CommonLibSSE NG
NiTexture.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 #include "RE/N/NiObject.h"
5 #include "RE/N/NiSmartPointer.h"
6 
7 struct ID3D11Texture2D;
8 struct ID3D11ShaderResourceView;
9 
10 namespace RE
11 {
13 
14  class NiTexture : public NiObject
15  {
16  public:
17  inline static constexpr auto RTTI = RTTI_NiTexture;
18  inline static auto Ni_RTTI = NiRTTI_NiTexture;
19 
21  {
22  public:
23  enum class PixelLayout
24  {
29  kBumpmap,
31  kDefault,
40  };
41 
42  enum class AlphaFormat
43  {
44  kNone,
45  kBinary, // 1-bit
46  kSmooth, // multi-bit
47  kDefault
48  };
49 
50  enum class MipFlag
51  {
52  kNo = 0,
53  kYes = 1,
54  kDefault
55  };
56 
58 
59  // members
63  std::uint32_t pad0C; // 0C
64  };
65  static_assert(sizeof(FormatPrefs) == 0x10);
66 
68  {
69  public:
70  RendererData(std::uint16_t width, std::uint16_t height) noexcept :
71  width(width), height(height) {}
72 
73  ID3D11Texture2D* texture{ nullptr }; // 00
74  std::uint64_t unk08{ 0 }; // 08
75  ID3D11ShaderResourceView* resourceView{ nullptr }; // 10
76  std::uint16_t width; // 18
77  std::uint16_t height; // 1A
78  std::uint8_t unk1C{ 1 }; // 1C
79  std::uint8_t unk1D{ 0x1C }; // 1D
80  std::uint16_t unk1E{ 0 }; // 1E
81  std::uint32_t unk20{ 1 }; // 20
82  std::uint32_t unk24{ 0x130012 }; // 24
83 
85  };
86  static_assert(sizeof(RendererData) == 0x28);
87 
88  ~NiTexture() override;
89 
90  // override (NiObject)
91  [[nodiscard]] const NiRTTI* GetRTTI() const override; // 02
92 
93  // add
94  virtual void Unk_25(void); // 25 - { return 0; }
95  virtual void Unk_26(void); // 26 - { return 0; }
96  virtual void Unk_27(void); // 27 - { return "n/a"; }
97  virtual void Unk_28(void); // 28
98  virtual void Unk_29(void); // 29 - { return 0; }
99  virtual void Unk_2A(void); // 2A - { return 0; }
100 
101  // members
104  std::uint32_t unk28; // 28
105  std::uint32_t unk2C; // 2C
106  NiTexture* prev; // 30
107  NiTexture* next; // 38
108  };
109  static_assert(sizeof(NiTexture) == 0x40);
110 }
Definition: NiObject.h:37
Definition: NiRTTI.h:6
Definition: NiTexture.h:21
stl::enumeration< PixelLayout, std::uint32_t > pixelLayout
Definition: NiTexture.h:60
AlphaFormat
Definition: NiTexture.h:43
stl::enumeration< AlphaFormat, std::uint32_t > alphaFormat
Definition: NiTexture.h:61
stl::enumeration< MipFlag, std::uint32_t > mipMapped
Definition: NiTexture.h:62
std::uint32_t pad0C
Definition: NiTexture.h:63
PixelLayout
Definition: NiTexture.h:24
MipFlag
Definition: NiTexture.h:51
Definition: NiTexture.h:68
ID3D11ShaderResourceView * resourceView
Definition: NiTexture.h:75
std::uint32_t unk24
Definition: NiTexture.h:82
std::uint16_t unk1E
Definition: NiTexture.h:80
RendererData(std::uint16_t width, std::uint16_t height) noexcept
Definition: NiTexture.h:70
std::uint16_t width
Definition: NiTexture.h:76
std::uint64_t unk08
Definition: NiTexture.h:74
std::uint32_t unk20
Definition: NiTexture.h:81
std::uint8_t unk1C
Definition: NiTexture.h:78
std::uint8_t unk1D
Definition: NiTexture.h:79
std::uint16_t height
Definition: NiTexture.h:77
ID3D11Texture2D * texture
Definition: NiTexture.h:73
Definition: NiTexture.h:15
FormatPrefs formatPrefs
Definition: NiTexture.h:102
static auto Ni_RTTI
Definition: NiTexture.h:18
std::uint32_t unk28
Definition: NiTexture.h:104
virtual void Unk_28(void)
std::uint32_t unk2C
Definition: NiTexture.h:105
const NiRTTI * GetRTTI() const override
virtual void Unk_29(void)
NiTexture * prev
Definition: NiTexture.h:106
virtual void Unk_26(void)
NiTexture * next
Definition: NiTexture.h:107
~NiTexture() override
virtual void Unk_2A(void)
static constexpr auto RTTI
Definition: NiTexture.h:17
virtual void Unk_27(void)
BSFixedString name
Definition: NiTexture.h:103
virtual void Unk_25(void)
Definition: AbsorbEffect.h:6
NiSmartPointer(Actor)
constexpr REL::VariantID NiRTTI_NiTexture(523967, 410547, 0x316bfa0)
constexpr REL::VariantID RTTI_NiTexture(690426, 398281, 0x1f61f00)