Skip to content

Commit e130e98

Browse files
committed
Nothing to see here
1 parent 7dd4766 commit e130e98

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
- BASALT_ASSERT takes only one parameter
3030
- use the new BASALT_ASSERT_MSG for the old behaviour
3131

32-
### Deprecated
33-
3432
### Removed
3533
- Mat4::Camera (use gfx::Camera instead)
3634

3735
### Fixed
3836
- AltGr leaves a pushed down Ctrl key behind
3937

40-
### Security
41-
4238
## [0.2.0] - 2019-08-06
4339
### Added
4440
- Windows x86-64 build support

runtime/runtime/gfx/backend/d3d9/renderer.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,11 @@ auto D3D9Renderer::load_model(const std::string_view filePath) -> ModelHandle {
149149

150150
ComPtr<ID3DXBuffer> materialBuffer {};
151151
DWORD numMaterials {};
152-
BASALT_ASSERT(
153-
SUCCEEDED(::D3DXLoadMeshFromXW(wideFilePath.c_str(), D3DXMESH_SYSTEMMEM,
154-
mDevice.Get(), nullptr, materialBuffer.GetAddressOf(), nullptr, &numMaterials,
155-
model.mesh.GetAddressOf())));
152+
auto hr = ::D3DXLoadMeshFromXW(
153+
wideFilePath.c_str(), D3DXMESH_SYSTEMMEM, mDevice.Get(), nullptr
154+
, materialBuffer.GetAddressOf(), nullptr, &numMaterials
155+
, model.mesh.GetAddressOf());
156+
BASALT_ASSERT(SUCCEEDED(hr));
156157

157158
auto const* materials = static_cast<D3DXMATERIAL*>(materialBuffer->GetBufferPointer());
158159
model.materials.reserve(numMaterials);
@@ -170,9 +171,9 @@ auto D3D9Renderer::load_model(const std::string_view filePath) -> ModelHandle {
170171
strcpy_s(texPath.data(), texPath.size(), "data/");
171172
strcat_s(texPath.data(), texPath.size(), materials[i].pTextureFilename);
172173

173-
BASALT_ASSERT(
174-
SUCCEEDED(::D3DXCreateTextureFromFileA(mDevice.Get(), texPath.data(),
175-
model.textures[i].GetAddressOf())));
174+
hr = ::D3DXCreateTextureFromFileA(
175+
mDevice.Get(), texPath.data(), model.textures[i].GetAddressOf());
176+
BASALT_ASSERT(SUCCEEDED(hr));
176177
}
177178
}
178179

0 commit comments

Comments
 (0)