4#ifndef _TEXTUREBUILDER_H
5#define _TEXTUREBUILDER_H
13#include "PicoDDS/PicoDDS.h"
20 bool generateMipmaps =
false,
bool potExtend =
false,
bool forceRGBA =
true,
bool compressTextures =
true,
bool anisoFiltering =
true);
22 bool generateMipmaps =
false,
bool potExtend =
false,
bool forceRGBA =
true,
bool compressTextures =
true,
bool anisoFiltering =
true,
25 bool generateMipmaps =
false,
bool potExtend =
false,
bool forceRGBA =
true,
bool compressTextures =
true,
bool anisoFiltering =
true,
77 if (m_filenames.empty()) {
78 return CreateTexture(r);
80 SDL_LockMutex(m_textureLock);
83 SDL_UnlockMutex(m_textureLock);
88 SDL_UnlockMutex(m_textureLock);
98 std::vector<SDLSurfacePtr> m_cubemap;
99 PicoDDS::DDSImage m_dds;
100 std::vector<PicoDDS::DDSImage> m_ddsarray;
101 std::vector<std::string> m_filenames;
104 bool m_generateMipmaps;
108 bool m_compressTextures;
109 bool m_anisotropicFiltering;
122 void UpdateTexture(Texture *texture);
123 void PrepareSurface();
129 static SDL_mutex *m_textureLock;
Definition: Renderer.h:45
virtual Texture * CreateTexture(const TextureDescriptor &descriptor)=0
Texture * GetCachedTexture(const std::string &type, const std::string &name)
Definition: Renderer.cpp:26
void AddCachedTexture(const std::string &type, const std::string &name, Texture *texture)
Definition: Renderer.cpp:33
Definition: TextureBuilder.h:17
static TextureBuilder Array(const std::vector< std::string > &filenames, const size_t layers)
Definition: TextureBuilder.h:64
static TextureBuilder Model(const std::string &filename)
Definition: TextureBuilder.h:32
static TextureBuilder LookUpTable(const std::string &filename)
Definition: TextureBuilder.h:60
static void Init()
Definition: TextureBuilder.cpp:66
static TextureBuilder Billboard(const std::string &filename)
Definition: TextureBuilder.h:40
static Texture * GetTransparentTexture(Renderer *)
Definition: TextureBuilder.cpp:375
Texture * GetOrCreateTexture(Renderer *r, const std::string &type)
Definition: TextureBuilder.h:75
~TextureBuilder()
Definition: TextureBuilder.cpp:62
const TextureDescriptor & GetDescriptor()
Definition: TextureBuilder.h:69
static TextureBuilder UI(const std::string &filename)
Definition: TextureBuilder.h:44
static TextureBuilder Raw(const std::string &filename)
Definition: TextureBuilder.h:52
static TextureBuilder Cube(const std::string &filename)
Definition: TextureBuilder.h:56
static TextureBuilder Decal(const std::string &filename)
Definition: TextureBuilder.h:48
static TextureBuilder Normal(const std::string &filename)
Definition: TextureBuilder.h:36
static Texture * GetWhiteTexture(Renderer *)
Definition: TextureBuilder.cpp:370
Definition: Texture.h:103
Definition: SDLWrappers.h:17
Definition: Background.h:14
TextureType
Definition: Texture.h:35
@ TEXTURE_2D
Definition: Texture.h:36
@ TEXTURE_CUBE_MAP
Definition: Texture.h:37
@ TEXTURE_2D_ARRAY
Definition: Texture.h:38
TextureSampleMode
Definition: Texture.h:28
@ NEAREST_REPEAT
Definition: Texture.h:32
@ NEAREST_CLAMP
Definition: Texture.h:30
@ LINEAR_CLAMP
Definition: Texture.h:29
@ LINEAR_REPEAT
Definition: Texture.h:31