4#include "gfx/Texture.h"
6using namespace System::Runtime::InteropServices;
84 Texture(System::String^ path, System::Guid guid,
int type);
107 return obj->getWidth();
113 return obj->getHeight();
119 return obj->getStoredWidth();
125 return obj->getStoredHeight();
133 else obj->setMagFilter(kmyGfx::Texture::kFILTER_NEAREST);
141 else obj->setMinFilter(kmyGfx::Texture::kFILTER_NEAREST);
148 obj->setUWrap(f ==
WRAPTYPE::kCLAMP ? kmyGfx::WRAPTYPE::kWRAPTYPE_CLAMP : kmyGfx::WRAPTYPE::kWRAPTYPE_REPEAT);
149 obj->setVWrap(f ==
WRAPTYPE::kCLAMP ? kmyGfx::WRAPTYPE::kWRAPTYPE_CLAMP : kmyGfx::WRAPTYPE::kWRAPTYPE_REPEAT);
156 obj->setUWrap(f ==
WRAPTYPE::kCLAMP ? kmyGfx::WRAPTYPE::kWRAPTYPE_CLAMP : kmyGfx::WRAPTYPE::kWRAPTYPE_REPEAT);
163 obj->setVWrap(f ==
WRAPTYPE::kCLAMP ? kmyGfx::WRAPTYPE::kWRAPTYPE_CLAMP : kmyGfx::WRAPTYPE::kWRAPTYPE_REPEAT);
170 obj->setWWrap(f ==
WRAPTYPE::kCLAMP ? kmyGfx::WRAPTYPE::kWRAPTYPE_CLAMP : kmyGfx::WRAPTYPE::kWRAPTYPE_REPEAT);
175 if (
obj)
obj->setAnisotropy(v);
180 if (
obj)
obj->setType((kmyGfx::TEXTURETYPE)type);
185 if (
obj)
obj->setUsage((kmyGfx::TEXTUREUSAGE)usage);
190 if (
obj)
obj->setCompress(flg);
195 void create(
int width,
int height,
bool srgb,
int miplevel);
203 static void getColor(System::String^ name, [System::Runtime::InteropServices::Out] array<UINT32>^% list,
int% width,
int% height);
213 return kmyGfx::GfxDriver::getInstance()->getMaxTexture2DSize();
223 void getColor([System::Runtime::InteropServices::Out] array<UINT32>^% list,
int level);
Definition: Texture.h:244
static bool bufferStoreJobFinished(int serial)
Definition: Texture.cpp:427
static void bufferStoreJobDispatchAll()
Definition: Texture.cpp:433
static int getBufferStoreJobSerial()
Definition: Texture.cpp:421
static void getColor(System::String^ name, [System::Runtime::InteropServices::Out] array< UINT32 >^% list, int% width, int% height)
Texture(kmyGfx::Texture *t)
Definition: Texture.h:86
System::String getFilePath()
Definition: Texture.cpp:372
void setGenMipmap(bool flg)
Definition: Texture.h:231
void storeSubPixel2DDelay(int x, int y, int w, int h, array< UINT32 >^ list, TEXTUREFFORMAT format, int sx, int sy, int swidth, int level)
Definition: Texture.cpp:184
void storeSubPixel2D(int x, int y, int w, int h, array< UINT32 >^ list, TEXTUREFFORMAT format, int sx, int sy, int swidth, int level)
void enableWrite()
Definition: Texture.h:197
void setSrgb(bool b)
Definition: Texture.h:230
Texture()
Definition: Texture.h:78
Texture(System::String^ path, System::Guid guid, int type)
System::Guid getGuid()
Definition: Texture.cpp:380
void removeRef()
Definition: Texture.h:234
int getStoredWidth()
Definition: Texture.h:116
void setAnisotropy(float v)
Definition: Texture.h:173
int getStoredHeight()
Definition: Texture.h:122
void setMinFilter(TEXTUREFILTER f)
Definition: Texture.h:136
int getRef()
Definition: Texture.h:236
int getHeight()
Definition: Texture.h:110
bool isSrgb()
Definition: Texture.h:229
void setCompress(bool flg)
Definition: Texture.h:188
static void textureStoreJobDispatchAll()
Definition: Texture.cpp:74
static int getMaxTexture2DSize()
Definition: Texture.h:211
static array< System::String^> getLoadableFileList(System::String^ path)
Definition: Texture.cpp:107
void create(int width, int height, bool srgb, int miplevel)
Definition: Texture.cpp:143
void getColor([System::Runtime::InteropServices::Out] array< UINT32 >^% list, int level)
void setNativeTexturePath(System::String^ path)
Definition: Texture.cpp:413
void reloadIfLoaded()
Definition: Texture.h:235
int getWidth()
Definition: Texture.h:104
static void pushFindTextureBaseDirectory(String^ path)
Definition: Texture.cpp:46
void saveNativeTexture(System::String^ path)
Definition: Texture.cpp:406
void setWrap(WRAPTYPE f)
Definition: Texture.h:144
void setType(int type)
Definition: Texture.h:178
void setWWrap(WRAPTYPE f)
Definition: Texture.h:166
void renamePath(System::String^ path)
Definition: Texture.cpp:132
System::String getFileName()
Definition: Texture.cpp:364
static int getTextureStoreJobSerial()
Definition: Texture.cpp:62
static Texture load(System::String^ path, bool srgb, TEXTURESHAPE shape, TEXTUREUSAGE usage)
kmyGfx::Texture * obj
Definition: Texture.h:75
static bool textureStoreJobFinished(int serial)
Definition: Texture.cpp:68
void setGuid(System::Guid id)
Definition: Texture.cpp:401
void setUWrap(WRAPTYPE f)
Definition: Texture.h:152
void Release()
Definition: Texture.h:92
static Texture load(System::IO::Stream^ stream, bool srgb, bool genmipmap, TEXTURESHAPE shape, TEXTUREUSAGE usage)
System::String loadpath
Definition: Texture.h:77
void setMagFilter(TEXTUREFILTER f)
Definition: Texture.h:128
static void popFindTextureBaseDirectory()
Definition: Texture.cpp:56
void setVWrap(WRAPTYPE f)
Definition: Texture.h:159
void copyTexture2DDelay(int dx, int dy, int dw, int dh, int dlevel, int sx, int sy, int slevel, Texture^ src)
Definition: Texture.cpp:179
bool ownImage
Definition: Texture.h:76
void setUsage(TEXTUREUSAGE usage)
Definition: Texture.h:183
void addRef()
Definition: Texture.h:233
void apply()
Definition: Texture.h:198
void Delete()
Definition: Texture.h:98
Definition: Billboard.cpp:4
TEXTURESHAPE
Definition: Texture.h:64
TEXTUREFFORMAT
Definition: Texture.h:21
TEXTUREUSAGE
Definition: Texture.h:57
TEXTUREFILTER
Definition: Texture.h:10
WRAPTYPE
Definition: Texture.h:15