comparison Engine/Graphics/Texture.cpp @ 2524:c7264ab7132f

Main menu rendered using d3d11
author a.parshin
date Fri, 10 Oct 2014 17:42:05 +0300
parents 3a1b56ab8749
children a902abdfc7f2
comparison
equal deleted inserted replaced
2523:c532d5242055 2524:c7264ab7132f
393 free(pPalette24); 393 free(pPalette24);
394 394
395 395
396 pLevelOfDetail0_prolly_alpha_mask = nullptr; 396 pLevelOfDetail0_prolly_alpha_mask = nullptr;
397 pLevelOfDetail1 = nullptr; 397 pLevelOfDetail1 = nullptr;
398 pLevelOfDetail2 = nullptr; 398 //pLevelOfDetail2 = nullptr;
399 pLevelOfDetail3 = nullptr; 399 //pLevelOfDetail3 = nullptr;
400
401 if (d3d11_srv)
402 {
403 if (d3d11_desc)
404 {
405 delete d3d11_desc;
406 d3d11_desc = nullptr;
407 }
408
409 extern void d3d11_release(struct ID3D11ShaderResourceView *);
410 d3d11_release(d3d11_srv);
411 d3d11_srv = nullptr;
412 }
400 413
401 pPalette16 = nullptr; 414 pPalette16 = nullptr;
402 pPalette24 = nullptr; 415 pPalette24 = nullptr;
403 416
404 uSizeOfMaxLevelOfDetail = 0; 417 uSizeOfMaxLevelOfDetail = 0;
492 uHeightLn2 = 0; 505 uHeightLn2 = 0;
493 uWidthLn2 = 0; 506 uWidthLn2 = 0;
494 palette_id1 = 0; 507 palette_id1 = 0;
495 palette_id2 = 0; 508 palette_id2 = 0;
496 pLevelOfDetail0_prolly_alpha_mask = nullptr; 509 pLevelOfDetail0_prolly_alpha_mask = nullptr;
497 pLevelOfDetail3 = nullptr; 510 //pLevelOfDetail3 = nullptr;
498 pLevelOfDetail2 = nullptr; 511 //pLevelOfDetail2 = nullptr;
499 pLevelOfDetail1 = nullptr; 512 pLevelOfDetail1 = nullptr;
500 pPalette16 = nullptr; 513 pPalette16 = nullptr;
501 pPalette24 = nullptr; 514 pPalette24 = nullptr;
515
516 d3d11_srv = nullptr;
517 d3d11_desc = nullptr;
502 } 518 }
503 519
504 //----- (0040F414) -------------------------------------------------------- 520 //----- (0040F414) --------------------------------------------------------
505 int RGBTexture::Load(const char *pContainer, int mode) 521 int RGBTexture::Load(const char *pContainer, int mode)
506 { 522 {
1288 this->uWidth = 0; 1304 this->uWidth = 0;
1289 this->field_1A = 0; 1305 this->field_1A = 0;
1290 this->field_18 = 0; 1306 this->field_18 = 0;
1291 1307
1292 if (d3d11_srv) 1308 if (d3d11_srv)
1293 __debugbreak(); // should properly release this stuff 1309 {
1294 d3d11_srv = nullptr; 1310 if (d3d11_desc)
1311 {
1312 delete d3d11_desc;
1313 d3d11_desc = nullptr;
1314 }
1315
1316 extern void d3d11_release(struct ID3D11ShaderResourceView *);
1317 d3d11_release(d3d11_srv);
1318 d3d11_srv = nullptr;
1319 }
1295 } 1320 }
1296 1321
1297 //----- (0040E55E) -------------------------------------------------------- 1322 //----- (0040E55E) --------------------------------------------------------
1298 int RGBTexture::LoadPCXFile(const char *Filename, unsigned int a3) 1323 int RGBTexture::LoadPCXFile(const char *Filename, unsigned int a3)
1299 { 1324 {