source: GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/Shark3D/demo_v5x0x7_t164x31u_enterpr_kwin32/src/res/client/actor/gfx.s3d_actor @ 2330

Revision 2330, 27.0 KB checked in by igarcia, 17 years ago (diff)
Line 
1///////////////////////////////////////////////////////////////////////////////
2//
3//      ##  ######
4//       ######  ###
5//  ## ###############        Shark 3D Engine (www.shark3d.com)
6//   ########## # # #
7//    ########                Copyright (c) 1996-2007 Spinor GmbH.
8//   ######### # # #          All rights reserved.
9//  ##   ##########
10//      ##
11//
12///////////////////////////////////////////////////////////////////////////////
13
14// Definition of the graphics output.
15// This includes the graphics engine object and the gfxports.
16//
17// This file defines three gfxports.
18// a) Display gfxport.   Depth range 0.00 to 0.01.
19// b) World gfxport.     Depth range 0.01 to 0.99
20// c) Sky gfxport.       Depth range 0.99 to 1.00
21
22// The client root actor is a capsule, defining an own local namespace.
23actor_ident "kit_base.capsule"
24actor_param
25{
26    // Delegate the action calls to all children:
27    active 1
28    // Scope name for reporting errors:
29    scope "gfx"
30    // Name of the capsule actor within its own namespace.
31    // Actors within the capsule can access the capsule
32    // actor itself by this name.
33    local_name "capsule"
34    // Delegate events from outside:
35    deleg_target "dispatch_export"
36    // The capsule actor contains a group of actors:
37    child_ident "kit_base.group"
38    child_param
39    {
40        // Delegate action calls to the children.
41        active 1
42        child_array
43        {
44            // Dispatcher for commands from outside the capsule.
45            ident "kit_base.dispatch"
46            param
47            {
48                name "dispatch_export"
49                entry_array
50                {
51                    cmds "set_cursor_x" "set_cursor_y"
52                         "move_cursor_x" "move_cursor_y"
53                    targets "cursordisplay"
54                }
55                {
56                    cmds "set_cursor_pos_xyz"
57                    targets "^^display"
58                }
59                {
60                    cmds "set_playerbody"
61                    targets "cursorraycast"
62                    newcmd "set_avoid"
63                }
64                {
65                    cmds "set_gfxmgr_level"
66                    targets "gfxsect_level"
67                    newcmd "assign_gfxmgr"
68                }
69                {
70                    cmds "set_state_display"
71                    targets "gfxport_display"
72                    newcmd "assign_state"
73                }
74                {
75                    cmds "set_state_world"
76                    targets "gfxport_world"
77                    newcmd "assign_state"
78                }
79                {
80                    cmds "set_state_sky"
81                    targets "gfxport_sky"
82                    newcmd "assign_state"
83                }
84                {
85                    cmds "set_sim_world"
86                    targets "inspperform_sim_world"
87                    newcmd "set_obj"
88                }
89                {
90                    cmds "set_sim_world"
91                    targets "cursorraycast"
92                    newcmd "set_sim"
93                }
94                {
95                    cmds "set_noise_world"
96                    targets "inspperform_noise_world"
97                    newcmd "set_obj"
98                }
99                {
100                    cmds "set_sensorstate_world"
101                    targets "inspperform_sensorstate_world"
102                    newcmd "set_obj"
103                }
104                {
105                    // Update camera transformation of world:
106                    cmds "set_camera_efftransf"
107                    targets "gfxport_world"
108                    newcmd "set_transf"
109                }
110                {
111                    // Click command:
112                    cmds "click"
113                        "set_cursor_x" "set_cursor_y"
114                        "move_cursor_x" "move_cursor_y"
115                    targets //"cursor"
116                }
117                {
118                    // Toggle frmtime information:
119                    cmds "toggle_frmtime"
120                    targets "inspfrmtime"
121                    newcmd "toggle_insp"
122                }
123                {
124                    // Toggle frmtime information:
125                    cmds "toggle_stat" "reset_stat"
126                    targets "inspfrmtime"
127                }
128                {
129                    cmds "reset_msg"
130                    targets "inspmsg"
131                    newcmd "reset"
132                }
133                {
134                    cmds "toggle_fullscreen"
135                    targets "gfxout"
136                }
137                {
138                    cmds "toggle_showgfxbound"
139                    targets
140                        "toggle_showgfxbound_sky"
141                        "toggle_showgfxbound_world"
142                        "toggle_showgfxbound_display"
143                    newcmd "perform"
144                }
145                {
146                    cmds "toggle_showgfxmesh"
147                    targets
148                        "toggle_showgfxmesh_sky"
149                        "toggle_showgfxmesh_world"
150                        "toggle_showgfxmesh_display"
151                    newcmd "perform"
152                }
153                {
154                    cmds "toggle_showgfxwire"
155                    targets
156                        "toggle_showgfxwire_sky"
157                        "toggle_showgfxwire_world"
158                        "toggle_showgfxwire_display"
159                    newcmd "perform"
160                }
161                {
162                    cmds "toggle_showgfxocclmesh"
163                    targets
164                        "toggle_showgfxocclmesh_sky"
165                        "toggle_showgfxocclmesh_world"
166                        "toggle_showgfxocclmesh_display"
167                    newcmd "perform"
168                }
169                {
170                    cmds "toggle_showgfxocclwire"
171                    targets
172                        "toggle_showgfxocclwire_sky"
173                        "toggle_showgfxocclwire_world"
174                        "toggle_showgfxocclwire_display"
175                    newcmd "perform"
176                }
177                {
178                    cmds "toggle_showphysbound"
179                    targets "toggle_showphysbound"
180                    newcmd "perform"
181                }
182                {
183                    cmds "toggle_showphysgeo"
184                    targets "toggle_showphysgeo"
185                    newcmd "perform"
186                }
187                {
188                    cmds "toggle_showphyscontact"
189                    targets "toggle_showphyscontact"
190                    newcmd "perform"
191                }
192                {
193                    cmds "toggle_shownoise"
194                    targets "toggle_shownoise"
195                    newcmd "perform"
196                }
197                {
198                    cmds "toggle_showsensorgeo"
199                    targets "toggle_showsensorgeo"
200                    newcmd "perform"
201                }
202                {
203                    cmds "toggle_showsensorbound"
204                    targets "toggle_showsensorbound"
205                    newcmd "perform"
206                }
207                {
208                    cmds "store_screenshot"
209                    targets "gfxeng"
210                }
211
212                // Paint sequence.
213                // The following entry_array define the steps in correct order
214                // which have to be performed for rendering a frame.
215                {
216                    cmds "paint"
217                    targets "cursorraycast"
218                    newcmd "perform_raycast"
219                }
220                {
221                    cmds "paint"
222                    targets "gfxport_display"
223                    newcmd "perform"
224                }
225                {
226                    // Paint the general information.
227                    cmds "paint"
228                    targets "inspmem"
229                    newcmd "perform_insp"
230                }
231                {
232                    // Paint the general information.
233                    cmds "paint"
234                    targets "inspmsg"
235                    newcmd "perform_insp"
236                }
237                {
238                    // Paint the general information.
239                    cmds "paint"
240                    targets "inspgeneral"
241                    newcmd "perform_insp"
242                }
243                {
244                    // Finish the paint cycle.
245                    cmds "paint"
246                    targets "gfxeng"
247                    newcmd "perform_insp"
248                }
249                {
250                    // Finish the paint cycle.
251                    cmds "paint"
252                    targets "gfxout"
253                    newcmd "perform_insp"
254                }
255                {
256                    cmds "paint"
257                    targets "cursordisplay"
258                    newcmd "perform_insp"
259                }
260                {
261                    cmds "paint"
262                    targets "cursorraycast"
263                    newcmd "perform_insp"
264                }
265                {
266                    // Update per-frame information of the gfx engine.
267                    cmds "paint"
268                    targets "inspperform_sim_world"
269                    newcmd "perform_insp"
270                }
271                {
272                    cmds "paint"
273                    targets "inspperform_noise_world"
274                    newcmd "perform_insp"
275                }
276                {
277                    // Update per-frame information of the gfx engine.
278                    cmds "paint"
279                    targets "inspperform_sensorstate_world"
280                    newcmd "perform_insp"
281                }
282                {
283                    // Paint the inspfrmtime last:
284                    cmds "paint"
285                    targets "inspfrmtime"
286                    newcmd "perform_insp"
287                }
288                {
289                    // Draw the per-frame information.
290                    cmds "paint"
291                    targets "insppaint"
292                    newcmd "paint"
293                }
294                {
295                    // Finish the paint cycle.
296                    cmds "paint"
297                    targets "gfxeng"
298                    newcmd "end_render"
299                }
300                {
301                    cmds "paint"
302                    targets "gfxout"
303                    newcmd "present"
304                }
305            }
306        }
307        {
308            // 3D graphics engine:
309            ident "kit_io.gfxeng"
310            param
311            {
312                name "gfxeng"
313                active 1
314                extcfg_actor "^^^cfg"
315                extcfg_entry_param "gfxeng"
316                extcfg_entry_insp_stat_enabled "insp.gfxstat"
317                inspcollect "^^inspcollect"
318                given_array
319                {
320                    item "^^^envcompsuppl"
321                    given_ident "envcompsuppl"
322                }
323                {
324                    item "^^^env"
325                    given_ident "env"
326                }
327            }
328        }
329        {
330            // 3D graphics engine:
331            ident "kit_io.gfxout"
332            param
333            {
334                ctx "^ctx"
335                gfxeng "gfxeng"
336                name "gfxout"
337                active 1
338                extcfg_actor "^^^cfg"
339                extcfg_entry_param "gfxout"
340                extcfg_entry_insp_base_enabled "insp.gfxbase"
341                inspcollect "^^inspcollect"
342            }
343        }
344        {
345            ident "kit_engbase.gfxctx"
346            param
347            {
348                name "gfxctx"
349                gfxeng "gfxeng"
350                extcfg_actor "^^^cfg"
351                extcfg_entry_featureset "feature_set"
352            }
353        }
354        {
355            // 3D graphics engine:
356            ident "kit_engbase.gfxsect"
357            param
358            {
359                name "gfxsect_display"
360                gfxctx "gfxctx"
361                gfxmgr_actor "^^display"
362                gfxmgr_cmd "get_display_gfxmgr"
363            }
364        }
365        {
366            // 3D graphics engine:
367            ident "kit_engbase.gfxsect"
368            param
369            {
370                name "gfxsect_level"
371                gfxctx "gfxctx"
372                gfxmgr_actor ""
373                gfxmgr_cmd ""
374            }
375        }
376        {
377            // Painting per-frame information lines.
378            ident "kit_engbase.insppaint"
379            param
380            {
381                name "insppaint"
382                inspcollect "^^inspcollect"
383                gfxctx "gfxctx"
384                tex_suppl "^^^basesuppl"
385                tex_ident "tex:client/texture/charset.tga"
386                extcfg_actor "^^^cfg"
387                extcfg_entry_chunk "insp.paint"
388            }
389        }
390
391        {
392            // Reporting general information.
393            ident "kit_base.inspmsg"
394            param
395            {
396                name "inspmsg"
397                inspcollect "^^inspcollect"
398                extcfg_actor "^^^cfg"
399                extcfg_entry_insp "insp.msg"
400                extcfg_entry_limit "insp.msg_limit"
401                extcfg_entry_alsoinfo "insp.msg_alsoinfo"
402            }
403        }
404        {
405            // Reporting general information.
406            ident "kit_base.inspgeneral"
407            param
408            {
409                name "inspgeneral"
410                inspcollect "^^inspcollect"
411                extcfg_actor "^^^cfg"
412                extcfg_entry_insp "insp.general"
413            }
414        }
415        {
416            // frmtime calculation actor.
417            ident "kit_base.inspfrmtime"
418            param
419            {
420                name "inspfrmtime"
421                inspcollect "^^inspcollect"
422                extcfg_actor "^^^cfg"
423                extcfg_entry_insp "insp.frmtime"
424                extcfg_entry_logfile "insp.frmtime_logfile"
425            }
426        }
427        {
428            //
429            ident "kit_base.inspmem"
430            param
431            {
432                name "inspmem"
433                inspcollect "^^inspcollect"
434                extcfg_actor "^^^cfg"
435                extcfg_entry_insp "insp.mem"
436            }
437        }
438        {
439            ident "kit_engbase.gfxport"
440            param
441            {
442                name "gfxport_sky"
443               
444                active 1
445               
446                gfxout "gfxout"
447                gfxctx "gfxctx"
448                next ""
449                couple 0
450               
451                state_actor ""
452                state_cmd ""
453               
454                gfxstat "gfxstat"
455               
456                extcfg_actor "^^^cfg"
457                extcfg_entry_proj "proj_world"
458                extcfg_entry_param "gfxport"
459                //extcfg_entry_eyedist "eyedist.display"
460
461                view_transl_x 0.00
462                view_transl_y 0.00
463                view_scale_x 1.00
464                view_scale_y 1.00
465                view_depth_start 0.99
466                view_depth_end 1.00
467
468                // Use orthogonal projection.
469                proj_ortho 0
470                // View frustum extension.
471                // These values are plane slopes in case of a persepctive
472                // projection, and coordinates otherwise.
473                // If all set to zero, read from cfguration file instead.
474                proj_open_x 0.0
475                proj_open_y 0.0
476                proj_center_x 0.0
477                proj_center_y 0.0
478                // Clipping plane coordinates.
479                proj_neg_z 0.05
480                proj_pos_z 1000.0
481                // Fog:
482                fog_color 0.5 0.5 0.5
483                //fog_density 0.02
484               
485                destprop_antialias 1
486                clear_must_coloralpha 1
487                clear_color 0.0 0.0 0.0
488
489                enum_trigger "main_trigger"
490            }
491        }
492        {
493            ident "kit_engbase.gfxport"
494            param
495            {
496                name "gfxport_world"
497               
498                active 1
499               
500                gfxout "gfxout"
501                gfxctx "gfxctx"
502                next "gfxport_sky"
503                couple 1   // Sky is coupled
504               
505                state_actor ""
506                state_cmd ""
507               
508                gfxstat "gfxstat"
509               
510                extcfg_actor "^^^cfg"
511                extcfg_entry_proj "proj_world"
512                extcfg_entry_param "gfxport"
513                //extcfg_entry_eyedist "eyedist.display"
514
515                view_transl_x 0.00
516                view_transl_y 0.00
517                view_scale_x 1.00
518                view_scale_y 1.00
519                view_depth_start 0.01
520                view_depth_end 0.99
521
522                // Use orthogonal projection.
523                proj_ortho 0
524                // View frustum extension.
525                // These values are plane slopes in case of a persepctive
526                // projection, and coordinates otherwise.
527                // If all set to zero, read from cfguration file instead.
528                proj_open_x 0.0
529                proj_open_y 0.0
530                proj_center_x 0.0
531                proj_center_y 0.0
532                // Clipping plane coordinates.
533                proj_neg_z 0.05
534                proj_pos_z 1000.0
535                // Fog:
536                fog_color 0.5 0.5 0.5
537                //fog_density 0.02
538
539                destprop_antialias 1
540                clear_must_coloralpha 1
541                clear_color 0.0 0.0 0.0
542
543                enum_trigger "main_trigger"
544            }
545        }
546        {
547            ident "kit_special.raycast"
548            param
549            {
550                name "raycast_cursor"
551            }
552        }
553        {
554            ident "kit_special.cursordisplay"
555            param
556            {
557                name "cursordisplay"
558               
559                cursor_actor "dispatch_export"
560                cursor_cmd "set_cursor_pos_xyz"
561
562                extcfg_actor "^^^cfg"
563                extcfg_entry_param "gfxeng"
564                extcfg_entry_insp_stat_enabled "insp.cursor"
565                inspcollect "^^inspcollect"
566            }
567        }
568        {
569            ident "kit_special.cursorraycast"
570            param
571            {
572                name "cursorraycast"
573                cursordisplay_src "cursordisplay"
574                cursordisplay_cmd "get_cursor_xy"
575                proj_src "gfxport_world"
576                proj_cmd "get_proj"
577                transf_src "gfxport_world"
578                transf_cmd "get_transf"
579                raycast_actor "raycast_cursor"
580                raycast_cmd "perform_raycast"
581                ray_start_z -1.0
582                ray_end_z 1.0
583
584                extcfg_actor "^^^cfg"
585                extcfg_entry_param "gfxeng"
586                extcfg_entry_insp_stat_enabled "insp.cursor"
587                inspcollect "^^inspcollect"
588            }
589        }
590        {
591            ident "kit_engbase.gfxport"
592            param
593            {
594                name "gfxport_display"
595               
596                active 1
597               
598                gfxout "gfxout"
599                gfxctx "gfxctx"
600                next "gfxport_world"
601                couple 0
602
603                state_actor "^^display"
604                state_cmd "get_display_state"
605               
606                gfxstat "gfxstat"
607               
608                extcfg_actor "^^^cfg"
609                extcfg_entry_proj "proj_display"
610                extcfg_entry_param "gfxport"
611                //extcfg_entry_eyedist "eyedist.display"
612
613                view_transl_x 0.00
614                view_transl_y 0.00
615                view_scale_x 1.00
616                view_scale_y 1.00
617                view_depth_start 0.00
618                view_depth_end 0.01
619
620                proj_ortho 1
621                proj_open_x 0.0
622                proj_open_y 0.0
623                proj_center_x 0.0
624                proj_center_y 0.0
625                proj_neg_z -1.0
626                proj_pos_z 1.0
627
628                fog_color 0.5 0.5 0.5
629                //fog_density 0.02
630
631                destprop_antialias 1
632                clear_must_coloralpha 1
633                clear_color 0.0 0.0 0.0
634
635                enum_trigger "main_trigger"
636            }
637        }
638        {
639            ident "kit_engbase.inspperform"
640            param
641            {
642                name "inspperform_sim_world"
643                inspcollect "^^inspcollect"
644                gfxport "gfxport_world"
645                obj ""
646            }
647        }
648        {
649            ident "kit_engbase.inspperform"
650            param
651            {
652                name "inspperform_noise_world"
653                inspcollect "^^inspcollect"
654                gfxport "gfxport_world"
655                obj ""
656            }
657        }
658        {
659            ident "kit_engbase.inspperform"
660            param
661            {
662                name "inspperform_sensorstate_world"
663                inspcollect "^^inspcollect"
664                gfxport "gfxport_world"
665                obj ""
666            }
667        }
668        {
669            ident "kit_base.paramstr"
670            param
671            {
672                name "toggle_showgfxbound_sky"
673                target "gfxport_sky"
674                cmd "toggle_mode_flag"
675                param "showbound"
676            }
677        }
678        {
679            ident "kit_base.paramstr"
680            param
681            {
682                name "toggle_showgfxbound_world"
683                target "gfxport_world"
684                cmd "toggle_mode_flag"
685                param "showbound"
686            }
687        }
688        {
689            ident "kit_base.paramstr"
690            param
691            {
692                name "toggle_showgfxbound_display"
693                target "gfxport_display"
694                cmd "toggle_mode_flag"
695                param "showbound"
696            }
697        }
698        {
699            ident "kit_base.paramstr"
700            param
701            {
702                name "toggle_showgfxmesh_sky"
703                target "gfxport_sky"
704                cmd "toggle_mode_flag"
705                param "showmesh"
706            }
707        }
708        {
709            ident "kit_base.paramstr"
710            param
711            {
712                name "toggle_showgfxmesh_world"
713                target "gfxport_world"
714                cmd "toggle_mode_flag"
715                param "showmesh"
716            }
717        }
718        {
719            ident "kit_base.paramstr"
720            param
721            {
722                name "toggle_showgfxmesh_display"
723                target "gfxport_display"
724                cmd "toggle_mode_flag"
725                param "showmesh"
726            }
727        }
728        {
729            ident "kit_base.paramstr"
730            param
731            {
732                name "toggle_showgfxwire_sky"
733                target "gfxport_sky"
734                cmd "toggle_mode_flag"
735                param "showwire"
736            }
737        }
738        {
739            ident "kit_base.paramstr"
740            param
741            {
742                name "toggle_showgfxwire_world"
743                target "gfxport_world"
744                cmd "toggle_mode_flag"
745                param "showwire"
746            }
747        }
748        {
749            ident "kit_base.paramstr"
750            param
751            {
752                name "toggle_showgfxwire_display"
753                target "gfxport_display"
754                cmd "toggle_mode_flag"
755                param "showwire"
756            }
757        }
758        {
759            ident "kit_base.paramstr"
760            param
761            {
762                name "toggle_showgfxocclmesh_sky"
763                target "gfxport_sky"
764                cmd "toggle_mode_flag"
765                param "showocclmesh"
766            }
767        }
768        {
769            ident "kit_base.paramstr"
770            param
771            {
772                name "toggle_showgfxocclmesh_world"
773                target "gfxport_world"
774                cmd "toggle_mode_flag"
775                param "showocclmesh"
776            }
777        }
778        {
779            ident "kit_base.paramstr"
780            param
781            {
782                name "toggle_showgfxocclmesh_display"
783                target "gfxport_display"
784                cmd "toggle_mode_flag"
785                param "showocclmesh"
786            }
787        }
788        {
789            ident "kit_base.paramstr"
790            param
791            {
792                name "toggle_showgfxocclwire_sky"
793                target "gfxport_sky"
794                cmd "toggle_mode_flag"
795                param "showocclwire"
796            }
797        }
798        {
799            ident "kit_base.paramstr"
800            param
801            {
802                name "toggle_showgfxocclwire_world"
803                target "gfxport_world"
804                cmd "toggle_mode_flag"
805                param "showocclwire"
806            }
807        }
808        {
809            ident "kit_base.paramstr"
810            param
811            {
812                name "toggle_showgfxocclwire_display"
813                target "gfxport_display"
814                cmd "toggle_mode_flag"
815                param "showocclwire"
816            }
817        }
818        {
819            ident "kit_base.paramstr"
820            param
821            {
822                name "toggle_showphysbound"
823                target "gfxport_world"
824                cmd "toggle_mode_flag"
825                param "showphysbound"
826            }
827        }
828        {
829            ident "kit_base.paramstr"
830            param
831            {
832                name "toggle_showphysgeo"
833                target "gfxport_world"
834                cmd "toggle_mode_flag"
835                param "showphysgeo"
836            }
837        }
838        {
839            ident "kit_base.paramstr"
840            param
841            {
842                name "toggle_showphyscontact"
843                target "gfxport_world"
844                cmd "toggle_mode_flag"
845                param "showphyscontact"
846            }
847        }
848        {
849            ident "kit_base.paramstr"
850            param
851            {
852                name "toggle_shownoise"
853                target "gfxport_world"
854                cmd "toggle_mode_flag"
855                param "shownoise"
856            }
857        }
858        {
859            ident "kit_base.paramstr"
860            param
861            {
862                name "toggle_showsensorbound"
863                target "gfxport_world"
864                cmd "toggle_mode_flag"
865                param "showsensorbound"
866            }
867        }
868        {
869            ident "kit_base.paramstr"
870            param
871            {
872                name "toggle_showsensorgeo"
873                target "gfxport_world"
874                cmd "toggle_mode_flag"
875                param "showsensorgeo"
876            }
877        }
878    }
879}
Note: See TracBrowser for help on using the repository browser.