2023-08-31 15:59:33 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_NIF_TEXTURE_HPP
|
|
|
|
#define OPENMW_COMPONENTS_NIF_TEXTURE_HPP
|
2010-01-06 11:28:37 +00:00
|
|
|
|
2014-10-19 06:26:44 +00:00
|
|
|
#include "base.hpp"
|
2010-01-06 11:28:37 +00:00
|
|
|
|
|
|
|
namespace Nif
|
|
|
|
{
|
|
|
|
|
2023-09-09 18:32:42 +00:00
|
|
|
struct NiTexture : public NiObjectNET
|
2023-08-31 15:59:33 +00:00
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct NiSourceTexture : public NiTexture
|
2020-12-12 23:35:57 +00:00
|
|
|
{
|
2023-08-31 17:33:43 +00:00
|
|
|
enum class PixelLayout : uint32_t
|
|
|
|
{
|
|
|
|
Palette = 0,
|
|
|
|
HighColor = 1,
|
|
|
|
TrueColor = 2,
|
|
|
|
Compressed = 3,
|
|
|
|
BumpMap = 4,
|
|
|
|
Default = 5,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class MipMapFormat : uint32_t
|
|
|
|
{
|
|
|
|
No = 0,
|
|
|
|
Yes = 1,
|
|
|
|
Default = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class AlphaFormat : uint32_t
|
|
|
|
{
|
|
|
|
None = 0,
|
|
|
|
Binary = 1,
|
|
|
|
Smooth = 2,
|
|
|
|
Default = 3,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FormatPrefs
|
|
|
|
{
|
|
|
|
PixelLayout mPixelLayout;
|
|
|
|
MipMapFormat mUseMipMaps;
|
|
|
|
AlphaFormat mAlphaFormat;
|
|
|
|
};
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2023-08-31 17:33:43 +00:00
|
|
|
char mExternal; // References external file
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2023-08-31 17:33:43 +00:00
|
|
|
std::string mFile;
|
|
|
|
NiPixelDataPtr mData;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2023-08-31 17:33:43 +00:00
|
|
|
FormatPrefs mPrefs;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2023-08-31 17:33:43 +00:00
|
|
|
char mIsStatic{ 1 };
|
|
|
|
bool mDirectRendering{ true };
|
|
|
|
bool mPersistRenderData{ false };
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2020-12-12 23:35:57 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2022-09-17 17:24:42 +00:00
|
|
|
void post(Reader& nif) override;
|
2020-12-12 23:35:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct BSShaderTextureSet : public Record
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2023-08-31 17:33:43 +00:00
|
|
|
enum class TextureType : uint32_t
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2023-08-31 17:33:43 +00:00
|
|
|
Base = 0,
|
|
|
|
Normal = 1,
|
|
|
|
Glow = 2,
|
|
|
|
Parallax = 3,
|
|
|
|
Environment = 4,
|
|
|
|
EnvironmentMask = 5,
|
|
|
|
Subsurface = 6,
|
|
|
|
BackLighting = 7,
|
2022-09-22 18:26:05 +00:00
|
|
|
};
|
2023-08-31 17:33:43 +00:00
|
|
|
std::vector<std::string> mTextures;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2020-12-12 23:35:57 +00:00
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
2019-09-13 16:54:19 +00:00
|
|
|
|
2023-08-31 15:24:36 +00:00
|
|
|
}
|
2010-01-06 11:28:37 +00:00
|
|
|
#endif
|