mirror of
https://github.com/leozide/leocad.git
synced 2026-07-28 04:07:11 +00:00
Added option to disable mesh LOD. Closes #400.
This commit is contained in:
+2
-1
@@ -12,6 +12,7 @@ lcScene::lcScene()
|
||||
{
|
||||
mActiveSubmodelInstance = nullptr;
|
||||
mAllowWireframe = true;
|
||||
mAllowLOD = true;
|
||||
}
|
||||
|
||||
void lcScene::Begin(const lcMatrix44& ViewMatrix)
|
||||
@@ -60,7 +61,7 @@ void lcScene::AddMesh(lcMesh* Mesh, const lcMatrix44& WorldMatrix, int ColorInde
|
||||
RenderMesh.ColorIndex = ColorIndex;
|
||||
RenderMesh.State = State;
|
||||
float Distance = fabsf(lcMul31(WorldMatrix[3], mViewMatrix).z);
|
||||
RenderMesh.LodIndex = RenderMesh.Mesh->GetLodIndex(Distance);
|
||||
RenderMesh.LodIndex = mAllowLOD ? RenderMesh.Mesh->GetLodIndex(Distance) : LC_MESH_LOD_HIGH;
|
||||
|
||||
bool Translucent = lcIsColorTranslucent(ColorIndex);
|
||||
lcMeshFlags Flags = Mesh->mFlags;
|
||||
|
||||
Reference in New Issue
Block a user