SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CohTextureConverter.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #pragma once
9 
10 #include <Lutefisk3D/Container/Ptr.h>
11 #include <Lutefisk3D/Graphics/Texture.h>
12 #include <Lutefisk3D/Math/Vector2.h>
13 #include <glm/vec2.hpp>
14 #include <QHash>
15 #include <vector>
16 
17 struct TextureModifiers;
18 class QString;
19 
20 namespace Urho3D
21 {
22  class Texture;
23  class Context;
24 }
25 
26 enum class CoHBlendMode : uint8_t;
27 
29 {
30  enum
31  {
32  ALPHA = 0x1,
33  RGB8 = 0x2,
34  COMP4 = 0x4,
35  COMP8 = 0x8,
36  DUAL = 0x10,
37  CLAMP = 0x80,
38  CUBEMAPFACE = 0x200,
39  REPLACEABLE = 0x400,
40  BUMPMAP = 0x800,
41  BUMPMAP_MIRROR = 0x1000,
42  };
43  Urho3D::SharedPtr<Urho3D::Texture> base {nullptr};
44  QString detailname;
45  QString bumpmap;
46  int flags {0};
47  glm::vec2 scaleUV0 {0,0};
48  glm::vec2 scaleUV1 {0,0};
49  CoHBlendMode BlendType = CoHBlendMode(0);
50  TextureModifiers *info {nullptr};
51 };
52 
53 enum TexOpt : uint32_t
54 {
55  FADE = 1,
56  DUAL = 0x10,
57  REPLACEABLE = 0x800,
58  BUMPMAP = 0x1000,
59 };
60 
61 extern QHash<QString,TextureModifiers *> g_texture_path_to_mod;
62 TextureWrapper tryLoadTexture(Urho3D::Context *ctx, const QString &fname);
63 void preloadTextureNames();
64 std::vector<TextureWrapper> getModelTextures(Urho3D::Context *ctx,std::vector<QString> &a1);
TextureWrapper tryLoadTexture(Urho3D::Context *ctx, const QString &fname)
Definition: CohTextureConverter.cpp:163
Definition: CohTextureConverter.h:28
Definition: CohTextureConverter.h:58
QString detailname
Definition: CohTextureConverter.h:44
QString bumpmap
Definition: CohTextureConverter.h:45
TexOpt
Definition: CohTextureConverter.h:53
Definition: CohTextureConverter.h:57
CoHBlendMode
Definition: CoHSceneConverter.h:32
std::vector< TextureWrapper > getModelTextures(Urho3D::Context *ctx, std::vector< QString > &a1)
Definition: CohTextureConverter.cpp:236
Definition: CohTextureConverter.h:55
Definition: CohTextureConverter.h:56
QHash< QString, TextureModifiers * > g_texture_path_to_mod
Definition: CohTextureConverter.cpp:33
Definition: trick_definitions.h:55
void preloadTextureNames()
Definition: CohTextureConverter.cpp:224