Debian Codegraph @

gui/dialogs/rendering.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <PropertyList>
4 <name>rendering</name>
5 <modal>false</modal>
6 <layout>vbox</layout>
7 <padding>20</padding>
8
9 <group>
10 <layout>hbox</layout>
11
12 <text>
13 <label>Rendering Options</label>
14 </text>
15
16 <empty>
17 <stretch>1</stretch>
18 </empty>
19
20 <button>
21 <legend>X</legend>
22 <key>Esc</key>
23 <pref-width>20</pref-width>
24 <pref-height>20</pref-height>
25 <binding>
26 <command>dialog-close</command>
27 </binding>
28 </button>
29 </group>
30
31 <hrule/>
32
33 <text>
34 <visible>
35 <equals>
36 <property>/sim/gui/dialogs/rendering/shader-warning</property>
37 <value>1</value>
38 </equals>
39 </visible>
40 <color>
41 <red>1.0</red>
42 <green>0.6</green>
43 <blue>0.6</blue>
44 </color>
45 <label>Warning: Your graphics card may not support complex graphics.</label>
46 </text>
47
48 <group>
49 <halign>center</halign>
50 <layout>hbox</layout>
51
52 <!-- only for a gap -->
53 <group>
54 <layout>vbox</layout>
55 <default-padding>1</default-padding>
56 <text>
57 <label> </label>
58 </text>
59 </group>
60
61 <group>
62 <layout>vbox</layout>
63
64 <group>
65 <layout>hbox</layout>
66 <halign>left</halign>
67
68 <checkbox>
69 <label>Throttle frame rate</label>
70 <name>frame-rate-throttle</name>
71 <property>/sim/gui/frame-rate-throttled</property>
72 <binding>
73 <command>dialog-apply</command>
74 <object-name>frame-rate-throttle</object-name>
75 </binding>
76 <binding>
77 <command>nasal</command>
78 <script>
79 var throttled = getprop("/sim/gui/frame-rate-throttled");
80 if (throttled)
81 setprop("/sim/frame-rate-throttle-hz", 60);
82 else
83 setprop("/sim/frame-rate-throttle-hz", 0);
84 </script>
85 </binding>
86 </checkbox>
87 <empty>
88 <pref-width>46</pref-width>
89 </empty>
90 <slider>
91 <name>frame-rate</name>
92 <visible>
93 <greater-than>
94 <property>/sim/frame-rate-throttle-hz</property>
95 <value>0</value>
96 </greater-than>
97 </visible>
98 <min>15.0</min>
99 <max>70.0</max>
100 <step>1.0</step>
101 <live>true</live>
102 <property>/sim/frame-rate-throttle-hz</property>
103 <binding>
104 <command>dialog-apply</command>
105 <object-name>frame-rate</object-name>
106 </binding>
107 </slider>
108 <text>
109 <visible>
110 <greater-than>
111 <property>/sim/frame-rate-throttle-hz</property>
112 <value>0</value>
113 </greater-than>
114 </visible>
115 <label>99 Hz</label>
116 <format>%2.0f Hz</format>
117 <live>true</live>
118 <property>/sim/frame-rate-throttle-hz</property>
119 </text>
120 </group>
121
122 <checkbox>
123 <halign>left</halign>
124 <label>Compensate field of view for wider screens</label>
125 <property>sim/current-view/field-of-view-compensation</property>
126 <binding>
127 <command>nasal</command>
128 <script>view.screenWidthCompens.toggle()</script>
129 </binding>
130 </checkbox>
131
132 <checkbox>
133 <halign>left</halign>
134 <label>Use disk space for faster loading (DDS Texture Cache)</label>
135 <name>texture-cache-enabled</name>
136 <property>/sim/rendering/texture-cache/cache-enabled</property>
137 <binding>
138 <command>dialog-apply</command>
139 <object-name>texture-cache-enabled</object-name>
140 </binding>
141 </checkbox>
142
143 <checkbox>
144 <halign>left</halign>
145 <label>Use point sprites for runway lights</label>
146 <property>/sim/rendering/point-sprites</property>
147 <binding>
148 <command>dialog-apply</command>
149 </binding>
150 </checkbox>
151
152 <checkbox>
153 <halign>left</halign>
154 <label>Use triangles for directional lights</label>
155 <property>/sim/rendering/triangle-directional-lights</property>
156 <binding>
157 <command>dialog-apply</command>
158 </binding>
159 <enable>
160 <property>/sim/rendering/point-sprites</property>
161 </enable>
162 </checkbox>
163
164 <checkbox>
165 <halign>left</halign>
166 <label>Animated jetways</label>
167 <name>jetways</name>
168 <property>/nasal/jetways/enabled</property>
169 <binding>
170 <command>dialog-apply</command>
171 <object-name>jetways</object-name>
172 </binding>
173 </checkbox>
174
175 <checkbox>
176 <halign>left</halign>
177 <label>Satellite Photoscenery</label>
178 <name>satellite-photoscenery</name>
179 <property>/sim/rendering/photoscenery/enabled</property>
180 <binding>
181 <command>dialog-apply</command>
182 <object-name>satellite-photoscenery</object-name>
183 </binding>
184 </checkbox>
185
186 <checkbox>
187 <halign>left</halign>
188 <label>Wireframe</label>
189 <name>wireframe</name>
190 <property>/sim/rendering/wireframe</property>
191 <binding>
192 <command>dialog-apply</command>
193 <object-name>wireframe</object-name>
194 </binding>
195 </checkbox>
196
197 <group>
198 <layout>hbox</layout>
199 <halign>left</halign>
200 <text>
201 <label>Maximum number of aircraft and scenery tiles cached</label>
202 </text>
203 <slider>
204 <name>max-plod</name>
205 <min>100.0</min>
206 <max>10000.0</max>
207 <step>100.0</step>
208 <fraction>0.17</fraction>
209 <property>/sim/rendering/max-paged-lod</property>
210 <binding>
211 <command>dialog-apply</command>
212 <object-name>max-plod</object-name>
213 </binding>
214 </slider>
215 <text>
216 <label>12345</label>
217 <format>%d</format>
218 <live>true</live>
219 <property>/sim/rendering/max-paged-lod</property>
220 </text>
221 </group>
222
223 <text>
224 <color>
225 <red>1.0</red>
226 <green>0.6</green>
227 <blue>0.6</blue>
228 </color>
229 <label>Warning: High values use a lot amount of memory and GPU</label>
230 <visible>
231 <greater-than>
232 <property>/sim/rendering/max-paged-lod</property>
233 <value>500.0</value>
234 </greater-than>
235 </visible>
236 </text>
237
238 <hrule/>
239
240 <group>
241 <layout>table</layout>
242
243 <group>
244 <layout>hbox</layout>
245 <row>0</row>
246 <col>0</col>
247 <visible>
248 <property>/sim/rendering/preset-active</property>
249 </visible>
250 <text>
251 <halign>left</halign>
252 <label>Graphics Quality</label>
253 </text>
254 <combo>
255 <name>graphics-preset</name>
256 <pref-width>150</pref-width>
257 <property>/sim/gui/dialogs/rendering/preset</property>
258 <properties>/sim/gui/dialogs/rendering/presets-list</properties>
259 <binding>
260 <command>dialog-apply</command>
261 <object-name>graphics-preset</object-name>
262 </binding>
263 <binding>
264 <command>nasal</command>
265 <script>
266 fgcommand("apply-graphics-preset", props.Node.new({'preset-name': getprop("/sim/gui/dialogs/rendering/preset")}));
267 </script>
268 </binding>
269 </combo>
270 </group>
271
272 <group>
273 <layout>hbox</layout>
274 <row>0</row>
275 <col>0</col>
276 <visible>
277 <not>
278 <property>/sim/rendering/preset-active</property>
279 </not>
280 </visible>
281
282 <button>
283 <legend>Advanced Options</legend>
284 <halign>left</halign>
285 <binding>
286 <command>dialog-show</command>
287 <dialog-name>advanced-graphics-options</dialog-name>
288 </binding>
289 <binding>
290 <command>dialog-close</command>
291 <dialog-name>rendering</dialog-name>
292 </binding>
293 <pref-width>200</pref-width>
294 </button>
295 </group>
296
297 <checkbox>
298 <halign>left</halign>
299 <row>0</row>
300 <col>1</col>
301 <label>Custom</label>
302 <name>custom-settings</name>
303 <property>/sim/gui/dialogs/rendering/custom-settings</property>
304 <binding>
305 <command>dialog-apply</command>
306 <object-name>custom-settings</object-name>
307 </binding>
308 <binding>
309 <command>nasal</command>
310 <script>
311 setprop("/sim/rendering/preset-active", !getprop("/sim/gui/dialogs/rendering/custom-settings"));
312 </script>
313 </binding>
314 </checkbox>
315
316 </group>
317
318 <group>
319 <layout>table</layout>
320
321 <textbox>
322 <visible>
323 <property>/sim/rendering/preset-active</property>
324 </visible>
325 <row>0</row>
326 <col>0</col>
327 <name>preset-description</name>
328 <halign>fill</halign>
329 <stretch>true</stretch>
330 <pref-width>400</pref-width>
331 <pref-height>60</pref-height>
332 <slider>15</slider>
333 <editable>false</editable>
334 <wrap>true</wrap>
335 <live>true</live>
336 <top-line>0</top-line>
337 <property>/sim/rendering/preset-description</property>
338 </textbox>
339
340 <button>
341 <visible>
342 <not>
343 <property>/sim/rendering/preset-active</property>
344 </not>
345 </visible>
346 <row>0</row>
347 <col>0</col>
348 <legend>Save custom settings to file</legend>
349 <pref-width>200</pref-width>
350 <binding>
351 <command>nasal</command>
352 <script>
353 var save = func(n) fgcommand("save-graphics-preset", props.Node.new({ path: n.getValue() }));
354 custom_preset_sel = gui.FileSelector.new(save,
355 "Save Custom Settings", "Save", ["*.xml"],
356 getprop("/sim/fg-home"), "custom-preset.xml");
357 custom_preset_sel.open();
358 </script>
359 </binding>
360 </button>
361 </group>
362
363 <hrule/>
364
365 <group>
366 <layout>hbox</layout>
367 <checkbox>
368 <halign>left</halign>
369 <label>WS3.0 (Experimental - requires OSG 3.6)</label>
370 <name>ws30</name>
371 <property>/scenery/use-vpb</property>
372 <enable>
373 <property>/sim/gui/dialogs/rendering/vpb-available</property>
374 </enable>
375
376 <binding>
377 <command>dialog-apply</command>
378 <object-name>ws30</object-name>
379 </binding>
380 </checkbox>
381 </group>
382
383 <group>
384 <layout>hbox</layout>
385 <halign>right</halign>
386 <text>
387 <enable>
388 <equals>
389 <property>/scenery/use-vpb</property>
390 <value>true</value>
391 </equals>
392 </enable>
393 <label>Elevation delta below airports</label>
394 </text>
395 <slider>
396 <name>elev-delta</name>
397 <enable>
398 <equals>
399 <property>/scenery/use-vpb</property>
400 <value>true</value>
401 </equals>
402 </enable>
403 <min>0.0</min>
404 <max>20.0</max>
405 <step>1.0</step>
406 <fraction>0.17</fraction>
407 <property>/scenery/elevation-mesh/constraint-gap-m</property>
408 <binding>
409 <command>dialog-apply</command>
410 <object-name>elev-delta</object-name>
411 </binding>
412 </slider>
413 <text>
414 <label>1234567890</label>
415 <enable>
416 <equals>
417 <property>/scenery/use-vpb</property>
418 <value>true</value>
419 </equals>
420 </enable>
421 <format>%2dm</format>
422 <live>true</live>
423 <property>/scenery/elevation-mesh/constraint-gap-m</property>
424 </text>
425 </group>
426
427 <text>
428 <visible>
429 <property>/sim/rendering/restart-required</property>
430 </visible>
431 <color>
432 <red>1.0</red>
433 <green>0.6</green>
434 <blue>0.6</blue>
435 </color>
436 <label>Some changes require a complete restart to be applied.</label>
437 </text>
438
439 </group>
440
441 <!-- only for a gap -->
442 <group>
443 <layout>vbox</layout>
444 <default-padding>1</default-padding>
445 <text>
446 <label> </label>
447 </text>
448 </group>
449
450 </group>
451
452 <hrule/>
453
454 <button>
455 <legend> OK </legend>
456 <default>true</default>
457 <binding>
458 <command>nasal</command>
459 <script>
460 if (getprop("/sim/rendering/scenery-reload-required")) {
461 fgcommand("reinit", props.Node.new({"subsystem": "scenery"}));
462 }
463 if (getprop("/sim/rendering/compositor-reload-required")) {
464 fgcommand("reload-compositor");
465 }
466 </script>
467 </binding>
468 <binding>
469 <command>dialog-close</command>
470 </binding>
471 </button>
472
473 <nasal>
474 <open>
475 <![CDATA[
476 setprop("/sim/gui/frame-rate-throttled", (getprop("/sim/frame-rate-throttle-hz") > 0));
477 setprop("/sim/gui/dialogs/rendering/custom-settings", !getprop("/sim/rendering/preset-active"));
478
479 # Intel GPU warning
480 var vendor = getprop("/sim/rendering/gl-vendor");
481 if (vendor != nil) {
482 vendor = string.lc(vendor);
483 if (find("intel", vendor) != -1) {
484 setprop("/sim/gui/dialogs/rendering/shader-warning", 1);
485 } else {
486 setprop("/sim/gui/dialogs/rendering/shader-warning", 0);
487 }
488 }
489
490 # populate the presets combo based on the registered presets
491 fgcommand('list-graphics-presets', props.Node.new({
492 'destination-path': '/sim/gui/dialogs/rendering/presets-list',
493 'as-combobox-values':1,
494 'clear-destination':1,
495 }));
496
497 if (getprop('/sim/rendering/preset-active')) {
498 setprop('/sim/gui/dialogs/rendering/preset', getprop('/sim/rendering/preset-name'));
499 }
500
501 # WS 3.0
502 var osg_version = getprop("/sim/version/openscenegraph");
503 if ((osg_version != nil) and (find("3.6", osg_version) == 0 or find("3.7", osg_version) == 0)) {
504 # Currently vpb requires OSG 3.6 specifically.
505 setprop("/sim/gui/dialogs/rendering/vpb-available", 1);
506 } else {
507 setprop("/sim/gui/dialogs/rendering/vpb-available", 0);
508 }
509 ]]>
510 </open>
511 </nasal>
512 </PropertyList>