1
0
Fork 0

Workaround for "AI Models invisible"

expose the ai-range-mode flag to the static-lod dialog.
PagedLOD culling based on distance seems to be more reliable than that based
on projected screen size.
This commit is contained in:
Torsten Dreyer 2015-07-09 10:15:40 +02:00
parent 07c6050707
commit 50c388f634

View file

@ -1,6 +1,16 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<PropertyList> <PropertyList>
<nasal>
<open>
<![CDATA[
var modePixel = (getprop("/sim/rendering/static-lod/ai-range-mode-pixel") == 1);
setprop( "/sim/gui/dialogs/static-lod/mode/pixel", modePixel );
setprop( "/sim/gui/dialogs/static-lod/mode/distance", !modePixel );
]]>
</open>
</nasal>
<name>static-lod</name> <name>static-lod</name>
<layout>vbox</layout> <layout>vbox</layout>
@ -86,6 +96,56 @@
<property>/sim/rendering/static-lod/ai-detailed</property> <property>/sim/rendering/static-lod/ai-detailed</property>
</input> </input>
<radio>
<row>3</row>
<col>2</col>
<halign>left</halign>
<name>pixel</name>
<property>sim/gui/dialogs/static-lod/mode/pixel</property>
<live>true</live>
<label>Pixel</label>
<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/static-lod/mode/distance</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/static-lod/mode/pixel</property>
<value>1</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/rendering/static-lod/ai-range-mode-pixel</property>
<value>1</value>
</binding>
</radio>
<radio>
<row>3</row>
<col>3</col>
<halign>left</halign>
<name>distance</name>
<property>sim/gui/dialogs/static-lod/mode/distance</property>
<live>true</live>
<label>Distance (m)</label>
<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/static-lod/mode/distance</property>
<value>1</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/gui/dialogs/static-lod/mode/pixel</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>sim/rendering/static-lod/ai-range-mode-pixel</property>
<value>0</value>
</binding>
</radio>
<text> <text>
<row>4</row><col>0</col> <row>4</row><col>0</col>
<halign>right</halign> <halign>right</halign>