69bool TextureLoader::TextureLoadSuspended;
70int TextureLoader::TextureInactiveOverrideTime = 0;
72#define USE_MANAGED_TEXTURES
83 Root.Next = Root.Prev = &Root;
97 Root.Next->Prev = task;
112 Root.Prev->Next = task;
146 if (task->
List !=
this) {
238#ifdef Exception_Handler
239 LoaderThreadClass(
const char *thread_name =
"Texture loader thread") :
ThreadClass(thread_name, &Exception_Handler) {}
241 LoaderThreadClass(
const char *thread_name =
"Texture loader thread") :
ThreadClass(thread_name) {}
244 void Thread_Function();
251 unsigned reduction_factor,
277 for (
unsigned level=0;level<mips;++level) {
278 IDirect3DSurface8* d3d_surface=
NULL;
280 DX8_ErrorCode(d3d_texture->GetSurfaceLevel(level,&d3d_surface));
282 d3d_surface->Release();
287static bool Is_Format_Compressed(
WW3DFormat texture_format,
bool allow_compression)
291 bool compressed=
false;
328 WWASSERT(!_TextureLoadThread.Is_Running());
332 _TextureLoadThread.Execute();
333 _TextureLoadThread.Set_Priority(-4);
334 TextureInactiveOverrideTime = 0;
341 _TextureLoadThread.Stop();
369 unsigned poweroftwowidth = 1;
370 while (poweroftwowidth < width)
372 poweroftwowidth <<= 1;
375 unsigned poweroftwoheight = 1;
376 while (poweroftwoheight < height)
378 poweroftwoheight <<= 1;
381 unsigned poweroftwodepth = 1;
382 while (poweroftwodepth< depth)
384 poweroftwodepth <<= 1;
387 if (poweroftwowidth>dx8caps.MaxTextureWidth)
389 poweroftwowidth=dx8caps.MaxTextureWidth;
391 if (poweroftwoheight>dx8caps.MaxTextureHeight)
393 poweroftwoheight=dx8caps.MaxTextureHeight;
395 if (poweroftwodepth>dx8caps.MaxVolumeExtent)
397 poweroftwodepth=dx8caps.MaxVolumeExtent;
400 if (poweroftwowidth>poweroftwoheight)
402 while (poweroftwowidth/poweroftwoheight>8)
409 while (poweroftwoheight/poweroftwowidth>8)
415 width=poweroftwowidth;
416 height=poweroftwoheight;
417 depth=poweroftwodepth;
441 WWASSERT(dest_format==texture_format);
456 D3DLOCKED_RECT locked_rects[12];
457 WWASSERT(sysmem_texture->GetLevelCount()<=12);
460 for (level=0;level<sysmem_texture->GetLevelCount();++level) {
462 sysmem_texture->LockRect(
464 &locked_rects[level],
475 for (level=0;level<sysmem_texture->GetLevelCount()-1;++level) {
479 (
unsigned char*)locked_rects[level].pBits,
480 locked_rects[level].Pitch,
485 (
unsigned char*)locked_rects[level+1].pBits,
486 locked_rects[level+1].Pitch,
490 src_format=dest_format;
491 src_surface=(
unsigned char*)locked_rects[level].pBits;
492 src_pitch=locked_rects[level].Pitch;
498 for (level=0;level<sysmem_texture->GetLevelCount();++level) {
501#ifdef USE_MANAGED_TEXTURES
502 return sysmem_texture;
508 TextureBaseClass::MIP_LEVELS_ALL,
510 DX8CALL(UpdateTexture(sysmem_texture,d3d_texture));
511 sysmem_texture->Release();
513 WWDEBUG_SAY((
"Created non-managed texture (%s)\n",filename));
529 bool allow_compression)
533 bool compressed=Is_Format_Compressed(texture_format,allow_compression);
538 IDirect3DSurface8* d3d_surface=
NULL;
557 dest_format=texture_format;
561 unsigned width, height;
563 height=targa.
Header.Height;
564 unsigned src_width=targa.
Header.Width;
565 unsigned src_height=targa.
Header.Height;
572 unsigned char* src_surface=(
unsigned char*)targa.
GetImage();
575 unsigned char* converted_surface=
NULL;
578 converted_surface=
W3DNEWARRAY unsigned char[width*height*4];
592 targa.
Header.CMapDepth>>3,
594 src_surface=converted_surface;
601 unsigned src_pitch=src_width*src_bpp;
605 D3DLOCKED_RECT locked_rect;
607 d3d_surface->LockRect(
613 (
unsigned char*)locked_rect.pBits,
624 targa.
Header.CMapDepth>>3,
629 if (converted_surface)
delete[] converted_surface;
655 _ForegroundQueue.Remove(task);
670 _ForegroundQueue.Push_Back(task);
678 WWPROFILE((
"TextureLoader::Request_Background_Loading()"));
700 Begin_Load_And_Queue(task);
702 _ForegroundQueue.Push_Back(task);
709 WWPROFILE((
"TextureLoader::Request_Foreground_Loading()"));
731 _ForegroundQueue.Remove(task_thumb);
743 _ForegroundQueue.Remove(task);
744 _BackgroundQueue.Remove(task);
774 if (task->
Get_List() == &_BackgroundQueue) {
777 _BackgroundQueue.Remove(task);
780 _ForegroundQueue.Push_Back(task);
791 _ForegroundQueue.Push_Back(task);
823 done = _BackgroundQueue.Is_Empty() && _ForegroundQueue.Is_Empty();
838#pragma warning(disable:4201)
840#define UPDATE_NETWORK \
841 if (network_callback) { \
842 unsigned long time2 = timeGetTime(); \
843 if (time2 - time > 20) { \
844 network_callback(); \
854 if (TextureLoadSuspended) {
862 unsigned long time = timeGetTime();
868 switch (task->Get_Type()) {
870 Process_Foreground_Thumbnail(task);
874 Process_Foreground_Load(task);
885 TextureLoadSuspended=
true;
891 TextureLoadSuspended=
false;
921 Begin_Load_And_Queue(task);
971 d3d_texture->Release();
976void LoaderThreadClass::Thread_Function(
void)
988 TextureLoadTaskClass* task = _BackgroundQueue.
Pop_Front();
1067 task->
Init(tc, type, priority);
1076 _TexLoadFreeList.Push_Front(
this);
1140 Texture->ThumbnailLoadTask =
this;
1145 Texture->TextureLoadTask =
this;
1187 bool loaded =
false;
1190 if (
Texture->Is_Compression_Allowed()) {
1225 bool loaded =
false;
1228 if (
Texture->Is_Compression_Allowed()) {
1302static bool Get_Texture_Information
1304 const char* filename,
1305 unsigned& reduction,
1310 unsigned& mip_count,
1321 if (!dds_file.Is_Available())
return false;
1324 w = dds_file.Get_Width(0);
1325 h = dds_file.Get_Height(0);
1326 d = dds_file.Get_Depth(0);
1327 format = dds_file.Get_Format();
1328 mip_count = dds_file.Get_Mip_Level_Count();
1332 if (reqReduction >= mip_count)
1333 reqReduction=mip_count-1;
1341 while (curReduction < reqReduction && curWidth > minDim && curHeight > minDim)
1346 reduction=curReduction;
1363 for (
int i=targa.
Header.Width, j=targa.
Header.Height; i > 0 && j > 0; i>>=1, j>>=1)
1369 if (reqReduction >= mip_count)
1370 reqReduction=mip_count-1;
1374 int curWidth=targa.
Header.Width;
1375 int curHeight=targa.
Header.Height;
1378 while (curReduction < reqReduction && curWidth > minDim && curHeight > minDim)
1383 reduction=curReduction;
1412 unsigned orig_w,orig_h,orig_d,orig_mip_count,reduction;
1414 if (!Get_Texture_Information
1431 unsigned int width = orig_w;
1432 unsigned int height = orig_h;
1437 if (width != orig_w || height != orig_h)
1439 for (
unsigned int i = 1; i < orig_mip_count; ++i)
1441 unsigned w=orig_w>>i;
1443 unsigned h=orig_h>>i;
1450 if (w == tmp_w && h == tmp_h)
1478 int reducedWidth=
Width;
1479 int reducedHeight=
Height;
1483 if (!mip_level_count)
1487 mip_level_count = orig_mip_count-
Reduction;
1488 if (mip_level_count < 1)
1489 mip_level_count = 1;
1493 if (mip_level_count > orig_mip_count)
1495 mip_level_count = orig_mip_count;
1507 unsigned int max_mip_level_count = 1;
1515 max_mip_level_count++;
1518 if (mip_level_count > max_mip_level_count)
1520 mip_level_count = max_mip_level_count;
1543 unsigned width,height,depth,orig_mip_count,reduction;
1545 if (!Get_Texture_Information
1569 WWDEBUG_SAY((
"Invalid TGA format used in %s - only 24 and 32 bit formats should be used!\n",
Texture->Get_Full_Path()));
1573 unsigned ow = width;
1574 unsigned oh = height;
1576 if (width != ow || height != oh)
1578 WWDEBUG_SAY((
"Invalid texture size, scaling required. Texture: %s, size: %d x %d -> %d x %d\n",
Texture->Get_Full_Path(), ow, oh, width, height));
1606 int reducedWidth=
Width;
1607 int reducedHeight=
Height;
1608 int reducedMipCount=
Texture->MipLevelCount;
1785 D3DLOCKED_RECT locked_rect;
1814#ifndef USE_MANAGED_TEXTURES
1840 {
for (
unsigned int level = 0; level <
Reduction; ++level) {
1885 unsigned int src_bpp = 0;
1891 char palette[256*4];
1894 unsigned int src_width = targa.
Header.Width;
1895 unsigned int src_height = targa.
Header.Height;
1904 unsigned char * src_surface = (
unsigned char*)targa.
GetImage();
1905 unsigned char * converted_surface =
NULL;
1914 || src_width != width
1915 || src_height != height) {
1917 converted_surface =
new unsigned char[width*height*4];
1932 targa.
Header.CMapDepth>>3,
1935 hsv_shift=
Vector3(0.0f,0.0f,0.0f);
1937 src_surface = converted_surface;
1940 src_height = height;
1944 unsigned src_pitch = src_width * src_bpp;
1948 unsigned char * destination_surface =
new unsigned char[width*height*4];
1950 for (
unsigned int level = 0; level <
Reduction; ++level) {
1952 (
unsigned char *)destination_surface,
1972 delete [] destination_surface;
1992 hsv_shift=
Vector3(0.0f,0.0f,0.0f);
1999 if (!width || !height || !src_width || !src_height) {
2004 if (converted_surface) {
2005 delete[] converted_surface;
2046 for (
int f=0;f<6;f++)
2050 LockedCubeSurfacePtr[f][i] =
NULL;
2051 LockedCubeSurfacePitch[f][i] = 0;
2060 _CubeTexLoadFreeList.Push_Front(
this);
2099 for (
int f=0; f<6; f++)
2103 LockedCubeSurfacePtr[f][i] =
NULL;
2104 LockedCubeSurfacePitch[f][i] = 0;
2112 Texture->ThumbnailLoadTask =
this;
2117 Texture->TextureLoadTask =
this;
2131 for (
int f=0; f<6; f++)
2162 for (
unsigned int f=0; f<6; f++)
2166 D3DLOCKED_RECT locked_rect;
2169 Peek_D3D_Cube_Texture()->LockRect
2171 (D3DCUBEMAP_FACES)f,
2178 LockedCubeSurfacePtr[f][i] = (
unsigned char *)locked_rect.pBits;
2179 LockedCubeSurfacePitch[f][i]= locked_rect.Pitch;
2186 for (
unsigned int f=0; f<6; f++)
2190 if (LockedCubeSurfacePtr[f][i])
2195 Peek_D3D_Cube_Texture()->UnlockRect((D3DCUBEMAP_FACES)f,i)
2198 LockedCubeSurfacePtr[f][i] =
NULL;
2202#ifndef USE_MANAGED_TEXTURES
2211 DX8CALL(UpdateTexture(Peek_D3D_Volume_Texture(),tex));
2212 Peek_D3D_Volume_Texture()->Release();
2223 unsigned orig_w,orig_h,orig_d,orig_mip_count,reduction;
2225 if (!Get_Texture_Information
2242 unsigned int width = orig_w;
2243 unsigned int height = orig_h;
2248 if (width != orig_w || height != orig_h)
2250 for (
unsigned int i = 1; i < orig_mip_count; ++i)
2252 unsigned w=orig_w>>i;
2254 unsigned h=orig_h>>i;
2261 if (w == tmp_w && h == tmp_h)
2279 if (!mip_level_count)
2281 mip_level_count = orig_mip_count;
2283 else if (mip_level_count > orig_mip_count)
2285 mip_level_count = orig_mip_count;
2290 unsigned int max_mip_level_count = 1;
2298 max_mip_level_count++;
2301 if (mip_level_count > max_mip_level_count)
2303 mip_level_count = max_mip_level_count;
2325 unsigned width,height,depth,orig_mip_count,reduction;
2327 if (!Get_Texture_Information
2351 WWDEBUG_SAY((
"Invalid TGA format used in %s - only 24 and 32 bit formats should be used!\n",
Texture->Get_Full_Path()));
2355 unsigned ow = width;
2356 unsigned oh = height;
2358 if (width != ow || height != oh)
2360 WWDEBUG_SAY((
"Invalid texture size, scaling required. Texture: %s, size: %d x %d -> %d x %d\n",
Texture->Get_Full_Path(), ow, oh, width, height));
2402 for (
unsigned int face=0; face<6; face++)
2419 Get_Locked_CubeMap_Surface_Pointer(face,level),
2420 Get_Locked_CubeMap_Surface_Pitch(face,level),
2432unsigned char* CubeTextureLoadTaskClass::Get_Locked_CubeMap_Surface_Pointer(
unsigned int face,
unsigned int level)
2435 WWASSERT(LockedCubeSurfacePtr[face][level]);
2436 return LockedCubeSurfacePtr[face][level];
2439unsigned int CubeTextureLoadTaskClass::Get_Locked_CubeMap_Surface_Pitch(
unsigned int face,
unsigned int level)
const
2442 WWASSERT(LockedCubeSurfacePitch[face][level]);
2443 return LockedCubeSurfacePitch[face][level];
2464 LockedSurfaceSlicePitch[i] = 0;
2472 _VolTexLoadFreeList.Push_Front(
this);
2515 LockedSurfaceSlicePitch[i] = 0;
2522 Texture->ThumbnailLoadTask =
this;
2527 Texture->TextureLoadTask =
this;
2536 D3DLOCKED_BOX locked_box;
2539 Peek_D3D_Volume_Texture()->LockBox
2549 LockedSurfaceSlicePitch[i] = locked_box.SlicePitch;
2563 Peek_D3D_Volume_Texture()->UnlockBox(i)
2569#ifndef USE_MANAGED_TEXTURES
2571 DX8CALL(UpdateTexture(Peek_D3D_Volume_Texture(),tex));
2572 Peek_D3D_Volume_Texture()->Release();
2583 unsigned orig_w,orig_h,orig_d,orig_mip_count,reduction;
2585 if (!Get_Texture_Information
2602 unsigned int width = orig_w;
2603 unsigned int height = orig_h;
2604 unsigned int depth = orig_d;
2609 if (width != orig_w || height != orig_h || depth != orig_d)
2611 for (
unsigned int i = 1; i < orig_mip_count; ++i)
2613 unsigned w=orig_w>>i;
2615 unsigned h=orig_h>>i;
2617 unsigned d=orig_d>>i;
2625 if (w == tmp_w && h == tmp_h && d== tmp_d)
2645 if (!mip_level_count)
2647 mip_level_count = orig_mip_count;
2649 else if (mip_level_count > orig_mip_count)
2651 mip_level_count = orig_mip_count;
2656 unsigned int max_mip_level_count = 1;
2664 max_mip_level_count++;
2666 if (mip_level_count > max_mip_level_count)
2668 mip_level_count = max_mip_level_count;
2691 unsigned width,height,depth,orig_mip_count,reduction;
2693 if (!Get_Texture_Information
2717 WWDEBUG_SAY((
"Invalid TGA format used in %s - only 24 and 32 bit formats should be used!\n",
Texture->Get_Full_Path()));
2721 unsigned ow = width;
2722 unsigned oh = height;
2723 unsigned od = depth;
2725 if (width != ow || height != oh || depth != od)
2727 WWDEBUG_SAY((
"Invalid texture size, scaling required. Texture: %s, size: %d x %d -> %d x %d\n",
Texture->Get_Full_Path(), ow, oh, width, height));
2771 unsigned int depth=dds_file.
Get_Depth(0);
2775 WWASSERT(width && height && depth);
2779 if (width<1) width=1;
2780 if (height<1) height=1;
2781 if (depth<1) depth=1;
2791 Get_Locked_Volume_Pointer(level),
2792 Get_Locked_Volume_Row_Pitch(level),
2793 Get_Locked_Volume_Slice_Pitch(level),
2805unsigned char* VolumeTextureLoadTaskClass::Get_Locked_Volume_Pointer(
unsigned int level)
2812unsigned int VolumeTextureLoadTaskClass::Get_Locked_Volume_Row_Pitch(
unsigned int level)
2819unsigned int VolumeTextureLoadTaskClass::Get_Locked_Volume_Slice_Pitch(
unsigned int level)
2823 return LockedSurfaceSlicePitch[level];
#define TARGA_ERROR_HANDLER(call, filename)
static void Copy_Image_Generate_Mipmap(unsigned width, unsigned height, unsigned char *dest_surface, unsigned dest_pitch, WW3DFormat dest_format, unsigned char *src_surface, unsigned src_pitch, WW3DFormat src_format, unsigned char *mip_surface, unsigned mip_pitch, const Vector3 &hsv_shift=Vector3(0.0f, 0.0f, 0.0f))
static void Copy_Image(unsigned char *dest_surface, unsigned dest_surface_width, unsigned dest_surface_height, unsigned dest_surface_pitch, WW3DFormat dest_surface_format, unsigned char *src_surface, unsigned src_surface_width, unsigned src_surface_height, unsigned src_surface_pitch, WW3DFormat src_surface_format, const unsigned char *src_palette, unsigned src_palette_bpp, bool generate_mip_level, const Vector3 &hsv_shift=Vector3(0.0f, 0.0f, 0.0f))
virtual void Unlock_Surfaces(void)
virtual bool Load_Compressed_Mipmap(void)
virtual void Deinit(void)
virtual bool Begin_Uncompressed_Load(void)
CubeTextureLoadTaskClass()
virtual void Destroy(void)
virtual void Init(TextureBaseClass *tc, TaskType type, PriorityType priority)
virtual bool Begin_Compressed_Load(void)
virtual void Lock_Surfaces(void)
WW3DFormat Get_Format() const
bool Is_Available() const
unsigned Get_Height(unsigned level) const
unsigned Get_Mip_Level_Count() const
unsigned Get_Width(unsigned level) const
unsigned Get_Depth(unsigned level) const
void Copy_Level_To_Surface(unsigned level, IDirect3DSurface8 *d3d_surface, const Vector3 &hsv_shift=Vector3(0.0f, 0.0f, 0.0f))
void Copy_CubeMap_Level_To_Surface(unsigned face, unsigned level, WW3DFormat dest_format, unsigned width, unsigned height, unsigned char *surf, unsigned pitch, const Vector3 &hsv_shift=Vector3(0.0f, 0.0f, 0.0f))
void Copy_Volume_Level_To_Surface(unsigned level, unsigned depth, WW3DFormat dest_format, unsigned width, unsigned height, unsigned char *vol, unsigned row_pitch, unsigned slice_pitch, const Vector3 &hsv_shift=Vector3(0.0f, 0.0f, 0.0f))
D3DCAPS8 const & Get_DX8_Caps() const
bool Support_DXTC() const
static IDirect3DTexture8 * _Create_DX8_Texture(unsigned int width, unsigned int height, WW3DFormat format, MipCountType mip_level_count, D3DPOOL pool=D3DPOOL_MANAGED, bool rendertarget=false)
static const DX8Caps * Get_Current_Caps()
static IDirect3DCubeTexture8 * _Create_DX8_Cube_Texture(unsigned int width, unsigned int height, WW3DFormat format, MipCountType mip_level_count, D3DPOOL pool=D3DPOOL_MANAGED, bool rendertarget=false)
static unsigned _Get_Main_Thread_ID()
static IDirect3DSurface8 * _Create_DX8_Surface(unsigned int width, unsigned int height, WW3DFormat format)
static IDirect3DVolumeTexture8 * _Create_DX8_Volume_Texture(unsigned int width, unsigned int height, unsigned int depth, WW3DFormat format, MipCountType mip_level_count, D3DPOOL pool=D3DPOOL_MANAGED)
static IDirect3DSurface8 * _Create_Missing_Surface()
static IDirect3DTexture8 * _Get_Missing_Texture()
void Push_Front(TextureLoadTaskClass *task)
void Remove(TextureLoadTaskClass *task)
TextureLoadTaskClass * Pop_Front(void)
TextureLoadTaskClass * Pop_Back(void)
void Push_Back(TextureLoadTaskClass *task)
SynchronizedTextureLoadTaskListClass(void)
char * SetPalette(char *buffer)
char * GetPalette(void) const
long Load(const char *name, char *palette, char *image, bool invert_image=true)
char * GetImage(void) const
long Open(const char *name, long mode)
IDirect3DBaseTexture8 * Peek_D3D_Base_Texture() const
Returns a pointer to the d3d texture.
virtual TexAssetType Get_Asset_Type() const =0
static void Invalidate_Old_Unused_Textures(unsigned inactive_time_override)
Invalidate old unused textures.
const StringClass & Get_Full_Path(void) const
const Vector3 & Get_HSV_Shift()
bool Is_Initialized() const
virtual void Apply_New_Surface(IDirect3DBaseTexture8 *tex, bool initialized, bool disable_auto_invalidation=false)=0
WW3DFormat Get_Texture_Format() const
IDirect3DTexture8 * Peek_D3D_Texture(void)
unsigned int Get_Reduction(void) const
TextureBaseClass * Texture
WW3DFormat Get_Format(void) const
virtual void Deinit(void)
unsigned int Get_Height(void) const
virtual bool Load_Uncompressed_Mipmap(void)
~TextureLoadTaskClass(void)
virtual bool Load_Compressed_Mipmap(void)
unsigned int Get_Locked_Surface_Pitch(unsigned int level) const
unsigned int LockedSurfacePitch[MIP_LEVELS_MAX]
static TextureLoadTaskClass * Create(TextureBaseClass *tc, TaskType type, PriorityType priority)
virtual void Init(TextureBaseClass *tc, TaskType type, PriorityType priority)
virtual bool Begin_Compressed_Load(void)
virtual void Destroy(void)
unsigned char * LockedSurfacePtr[MIP_LEVELS_MAX]
TextureLoadTaskClass(void)
StateType Get_State(void) const
TaskType Get_Type(void) const
virtual bool Begin_Uncompressed_Load(void)
virtual void Lock_Surfaces(void)
static void Delete_Free_Pool(void)
unsigned int MipLevelCount
PriorityType Get_Priority(void) const
void Apply_Missing_Texture(void)
void Apply(bool initialize)
unsigned int Get_Mip_Level_Count(void) const
unsigned char * Get_Locked_Surface_Ptr(unsigned int level)
virtual void Unlock_Surfaces(void)
unsigned int Get_Width(void) const
TextureBaseClass * Peek_Texture(void)
void Set_State(StateType s)
IDirect3DBaseTexture8 * D3DTexture
void Set_Priority(PriorityType p)
TextureLoadTaskClass * Pop_Back(void)
bool Is_Empty(void) const
void Push_Back(TextureLoadTaskClass *task)
void Push_Front(TextureLoadTaskClass *task)
TextureLoadTaskClass * Pop_Front(void)
void Remove(TextureLoadTaskClass *task)
TextureLoadTaskListClass(void)
TextureLoadTaskListClass * Get_List(void)
TextureLoadTaskListNodeClass * Prev
TextureLoadTaskListClass * List
TextureLoadTaskListNodeClass * Next
static void Continue_Texture_Load()
static void Validate_Texture_Size(unsigned &width, unsigned &height, unsigned &depth)
static void Request_Background_Loading(TextureBaseClass *tc)
static void Flush_Pending_Load_Tasks(void)
static void Suspend_Texture_Load()
static void Request_Thumbnail(TextureBaseClass *tc)
static void Update(void(*network_callback)(void)=NULL)
static IDirect3DTexture8 * Load_Thumbnail(const StringClass &filename, const Vector3 &hsv_shift)
static bool Is_DX8_Thread(void)
static void Request_Foreground_Loading(TextureBaseClass *tc)
static IDirect3DSurface8 * Load_Surface_Immediate(const StringClass &filename, WW3DFormat surface_format, bool allow_compression)
ThreadClass(const char *name=NULL, ExceptionHandlerType exception_handler=NULL)
static void Switch_Thread()
static unsigned _Get_Current_Thread_ID()
WW3DFormat Get_Original_Texture_Format() const
unsigned Get_Width() const
unsigned Get_Height() const
unsigned Get_Original_Texture_Mip_Level_Count() const
unsigned Get_Original_Texture_Height() const
unsigned char * Peek_Bitmap()
unsigned Get_Original_Texture_Width() const
static ThumbnailClass * Peek_Thumbnail_Instance_From_Any_Manager(const StringClass &name)
virtual void Unlock_Surfaces(void)
virtual bool Load_Compressed_Mipmap(void)
virtual void Lock_Surfaces(void)
virtual void Init(TextureBaseClass *tc, TaskType type, PriorityType priority)
VolumeTextureLoadTaskClass()
virtual bool Begin_Compressed_Load(void)
virtual void Destroy(void)
virtual bool Begin_Uncompressed_Load(void)
static int Get_Texture_Reduction(void)
static int Get_Texture_Min_Dimension(void)
WWINLINE void DX8_ErrorCode(unsigned res)
#define REF_PTR_RELEASE(x)
#define REF_PTR_SET(dst, src)
#define USE_MANAGED_TEXTURES
IDirect3DTexture8 * Load_Compressed_Texture(const StringClass &filename, unsigned reduction_factor, MipCountType mip_level_count, WW3DFormat dest_format)
#define WWASSERT_PRINT(expr, string)
#define WWMEMLOG(category)