Minor update to optimize mesh performance
This commit is contained in:
Родитель
b05d547094
Коммит
2f6a842091
|
@ -736,10 +736,16 @@ void Sample::CreateDeviceDependentResources()
|
|||
m_models[i] = Model::CreateFromSDKMESH(s_modelPaths[i]);
|
||||
}
|
||||
|
||||
// Upload textures to GPU.
|
||||
ResourceUploadBatch resourceUpload(device);
|
||||
resourceUpload.Begin();
|
||||
|
||||
// Optimize meshes for rendering
|
||||
for (int i = 0; i < m_models.size(); ++i)
|
||||
{
|
||||
m_models[i]->LoadStaticBuffers(device, resourceUpload);
|
||||
}
|
||||
|
||||
// Upload textures to GPU.
|
||||
m_textureFactory = std::make_unique<EffectTextureFactory>(device, resourceUpload, m_srvPile->Heap());
|
||||
|
||||
auto texOffsets = std::vector<size_t>(m_models.size());
|
||||
|
|
Загрузка…
Ссылка в новой задаче