CommonLibSSE (powerof3)
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 constexpr auto Ni_RTTI = NiRTTI_NiTexture;
19  inline static constexpr auto VTABLE = VTABLE_NiTexture;
20 
22  {
23  public:
24  enum class PixelLayout
25  {
30  kBumpmap,
32  kDefault,
41  };
42 
43  enum class AlphaFormat
44  {
45  kNone,
46  kBinary, // 1-bit
47  kSmooth, // multi-bit
48  kDefault
49  };
50 
51  enum class MipFlag
52  {
53  kNo = 0,
54  kYes = 1,
55  kDefault
56  };
57 
59 
60  // members
64  std::uint32_t pad0C; // 0C
65  };
66  static_assert(sizeof(FormatPrefs) == 0x10);
67 
69  {
70  public:
71  RendererData(std::uint16_t width, std::uint16_t height) noexcept :
72  width(width), height(height) {}
73 
74  ID3D11Texture2D* texture{ nullptr }; // 00
75  std::uint64_t unk08{ 0 }; // 08
76  ID3D11ShaderResourceView* resourceView{ nullptr }; // 10
77  std::uint16_t width; // 18
78  std::uint16_t height; // 1A
79  std::uint8_t unk1C{ 1 }; // 1C
80  std::uint8_t unk1D{ 0x1C }; // 1D
81  std::uint16_t unk1E{ 0 }; // 1E
82  std::uint32_t unk20{ 1 }; // 20
83  std::uint32_t unk24{ 0x130012 }; // 24
84 
86  };
87  static_assert(sizeof(RendererData) == 0x28);
88 
89  ~NiTexture() override;
90 
91  // override (NiObject)
92  [[nodiscard]] const NiRTTI* GetRTTI() const override; // 02
93 
94  // add
95  virtual void Unk_25(void); // 25 - { return 0; }
96  virtual void Unk_26(void); // 26 - { return 0; }
97  virtual void Unk_27(void); // 27 - { return "n/a"; }
98  virtual void Unk_28(void); // 28
99  virtual void Unk_29(void); // 29 - { return 0; }
100  virtual void Unk_2A(void); // 2A - { return 0; }
101 
102  // members
105  std::uint32_t unk28; // 28
106  std::uint32_t unk2C; // 2C
107  NiTexture* prev; // 30
108  NiTexture* next; // 38
109  };
110  static_assert(sizeof(NiTexture) == 0x40);
111 }
Definition: NiObject.h:37
Definition: NiRTTI.h:6
Definition: NiTexture.h:22
REX::EnumSet< AlphaFormat, std::uint32_t > alphaFormat
Definition: NiTexture.h:62
AlphaFormat
Definition: NiTexture.h:44
std::uint32_t pad0C
Definition: NiTexture.h:64
PixelLayout
Definition: NiTexture.h:25
REX::EnumSet< MipFlag, std::uint32_t > mipMapped
Definition: NiTexture.h:63
REX::EnumSet< PixelLayout, std::uint32_t > pixelLayout
Definition: NiTexture.h:61
MipFlag
Definition: NiTexture.h:52
Definition: NiTexture.h:69
ID3D11ShaderResourceView * resourceView
Definition: NiTexture.h:76
std::uint32_t unk24
Definition: NiTexture.h:83
std::uint16_t unk1E
Definition: NiTexture.h:81
RendererData(std::uint16_t width, std::uint16_t height) noexcept
Definition: NiTexture.h:71
std::uint16_t width
Definition: NiTexture.h:77
std::uint64_t unk08
Definition: NiTexture.h:75
std::uint32_t unk20
Definition: NiTexture.h:82
std::uint8_t unk1C
Definition: NiTexture.h:79
std::uint8_t unk1D
Definition: NiTexture.h:80
std::uint16_t height
Definition: NiTexture.h:78
ID3D11Texture2D * texture
Definition: NiTexture.h:74
Definition: NiTexture.h:15
FormatPrefs formatPrefs
Definition: NiTexture.h:103
std::uint32_t unk28
Definition: NiTexture.h:105
virtual void Unk_28(void)
std::uint32_t unk2C
Definition: NiTexture.h:106
const NiRTTI * GetRTTI() const override
virtual void Unk_29(void)
NiTexture * prev
Definition: NiTexture.h:107
virtual void Unk_26(void)
static constexpr auto Ni_RTTI
Definition: NiTexture.h:18
NiTexture * next
Definition: NiTexture.h:108
~NiTexture() override
static constexpr auto VTABLE
Definition: NiTexture.h:19
virtual void Unk_2A(void)
static constexpr auto RTTI
Definition: NiTexture.h:17
virtual void Unk_27(void)
BSFixedString name
Definition: NiTexture.h:104
virtual void Unk_25(void)
Definition: AbsorbEffect.h:6
NiSmartPointer(Actor)
constexpr REL::ID RTTI_NiTexture(static_cast< std::uint64_t >(690426))
constexpr std::array< REL::ID, 1 > VTABLE_NiTexture
Definition: Offsets_VTABLE.h:12470
constexpr REL::ID NiRTTI_NiTexture(static_cast< std::uint64_t >(523967))