fixed assert
This commit is contained in:
parent
da79ebf048
commit
a95bde4687
2 changed files with 3 additions and 3 deletions
|
@ -1185,7 +1185,7 @@ struct AssetBrowserImpl : AssetBrowser {
|
|||
static TextFilter filter;
|
||||
filter.gui("Filter", width, focus);
|
||||
|
||||
float h = ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeightWithSpacing() * 2;
|
||||
float h = maximum(200.f, ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeightWithSpacing() * 2);
|
||||
|
||||
ImGui::BeginChild("Resources", ImVec2(0, h), false, ImGuiWindowFlags_HorizontalScrollbar);
|
||||
AssetCompiler& compiler = m_app.getAssetCompiler();
|
||||
|
|
|
@ -2919,9 +2919,9 @@ struct ModelPlugin final : AssetBrowser::IPlugin, AssetCompiler::IPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
const float radius = length(aabb.max - aabb.min) * 0.50001f;
|
||||
const float radius = maximum(1e-5f, length(aabb.max - aabb.min) * 0.50001f);
|
||||
const Vec3 center = (aabb.max + aabb.min) * 0.5f;
|
||||
const Vec3 eye = center + Vec3(1, 1, 1) * length(aabb.max - aabb.min) / SQRT2;
|
||||
const Vec3 eye = center + Vec3(1, 1, 1) * maximum(1e-5f, length(aabb.max - aabb.min)) / SQRT2;
|
||||
Matrix mtx;
|
||||
mtx.lookAt(eye, center, normalize(Vec3(1, -1, 1)));
|
||||
Viewport viewport;
|
||||
|
|
Loading…
Reference in a new issue