This commit is contained in:
Chuck Walbourn 2021-08-31 18:32:43 -07:00
Родитель de9bc0d306
Коммит 3b80ec1099
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -2042,10 +2042,10 @@ HRESULT Mesh::ExportToSDKMESH(const wchar_t* szFileName,
{ {
int result = WideCharToMultiByte(CP_UTF8, WC_NO_BEST_FIT_CHARS, int result = WideCharToMultiByte(CP_UTF8, WC_NO_BEST_FIT_CHARS,
m0->texture.c_str(), -1, m0->texture.c_str(), -1,
m2->AlbetoTexture, MAX_TEXTURE_NAME, nullptr, FALSE); m2->AlbedoTexture, MAX_TEXTURE_NAME, nullptr, FALSE);
if (!result) if (!result)
{ {
*m2->AlbetoTexture = 0; *m2->AlbedoTexture = 0;
} }
} }
@ -2055,7 +2055,7 @@ HRESULT Mesh::ExportToSDKMESH(const wchar_t* szFileName,
char dir[MAX_PATH] = {}; char dir[MAX_PATH] = {};
char fname[_MAX_FNAME] = {}; char fname[_MAX_FNAME] = {};
char ext[_MAX_EXT] = {}; char ext[_MAX_EXT] = {};
_splitpath_s(m2->AlbetoTexture, drive, dir, fname, ext); _splitpath_s(m2->AlbedoTexture, drive, dir, fname, ext);
std::string basename = fname; std::string basename = fname;
size_t pos = basename.find_last_of('_'); size_t pos = basename.find_last_of('_');

Просмотреть файл

@ -279,7 +279,7 @@ namespace DXUT
// PBR materials // PBR materials
char RMATexture[MAX_TEXTURE_NAME]; char RMATexture[MAX_TEXTURE_NAME];
char AlbetoTexture[MAX_TEXTURE_NAME]; char AlbedoTexture[MAX_TEXTURE_NAME];
char NormalTexture[MAX_TEXTURE_NAME]; char NormalTexture[MAX_TEXTURE_NAME];
char EmissiveTexture[MAX_TEXTURE_NAME]; char EmissiveTexture[MAX_TEXTURE_NAME];