fix viewer in case of unknown primitives.
parent
9be76c1ba5
commit
77ce4080b6
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
||||||
|
|
||||||
Copyright (c) 2006-2021, assimp team
|
Copyright (c) 2006-2021, assimp team
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use of this software in source and binary forms,
|
Redistribution and use of this software in source and binary forms,
|
||||||
|
|
|
@ -489,7 +489,7 @@ int CreateAssetData() {
|
||||||
nidx = 3;
|
nidx = 3;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ai_assert(false);
|
CLogWindow::Instance().WriteLine("Unknown primitiv type");
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -500,8 +500,7 @@ int CreateAssetData() {
|
||||||
// check whether we can use 16 bit indices
|
// check whether we can use 16 bit indices
|
||||||
if (numIndices >= 65536) {
|
if (numIndices >= 65536) {
|
||||||
// create 32 bit index buffer
|
// create 32 bit index buffer
|
||||||
if (FAILED(g_piDevice->CreateIndexBuffer(4 *
|
if (FAILED(g_piDevice->CreateIndexBuffer(4 * numIndices,
|
||||||
numIndices,
|
|
||||||
D3DUSAGE_WRITEONLY | dwUsage,
|
D3DUSAGE_WRITEONLY | dwUsage,
|
||||||
D3DFMT_INDEX32,
|
D3DFMT_INDEX32,
|
||||||
D3DPOOL_DEFAULT,
|
D3DPOOL_DEFAULT,
|
||||||
|
@ -523,7 +522,7 @@ int CreateAssetData() {
|
||||||
} else {
|
} else {
|
||||||
// create 16 bit index buffer
|
// create 16 bit index buffer
|
||||||
if (FAILED(g_piDevice->CreateIndexBuffer(2 *
|
if (FAILED(g_piDevice->CreateIndexBuffer(2 *
|
||||||
numIndices,
|
numIndices,
|
||||||
D3DUSAGE_WRITEONLY | dwUsage,
|
D3DUSAGE_WRITEONLY | dwUsage,
|
||||||
D3DFMT_INDEX16,
|
D3DFMT_INDEX16,
|
||||||
D3DPOOL_DEFAULT,
|
D3DPOOL_DEFAULT,
|
||||||
|
|
Loading…
Reference in New Issue