/////////////////////////////////////////////////////////////////////////////// // // ## ###### // ###### ### // ## ############### Shark 3D Engine (www.shark3d.com) // ########## # # # // ######## Copyright (c) 1996-2007 Spinor GmbH. // ######### # # # All rights reserved. // ## ########## // ## // /////////////////////////////////////////////////////////////////////////////// // Definition of the graphics output. // This includes the graphics engine object and the gfxports. // // This file defines three gfxports. // a) Display gfxport. Depth range 0.00 to 0.01. // b) World gfxport. Depth range 0.01 to 0.99 // c) Sky gfxport. Depth range 0.99 to 1.00 // The client root actor is a capsule, defining an own local namespace. actor_ident "kit_base.capsule" actor_param { // Delegate the action calls to all children: active 1 // Scope name for reporting errors: scope "gfx" // Name of the capsule actor within its own namespace. // Actors within the capsule can access the capsule // actor itself by this name. local_name "capsule" // Delegate events from outside: deleg_target "dispatch_export" // The capsule actor contains a group of actors: child_ident "kit_base.group" child_param { // Delegate action calls to the children. active 1 child_array { // Dispatcher for commands from outside the capsule. ident "kit_base.dispatch" param { name "dispatch_export" entry_array { cmds "set_cursor_x" "set_cursor_y" "move_cursor_x" "move_cursor_y" targets "cursordisplay" } { cmds "set_cursor_pos_xyz" targets "^^display" } { cmds "set_playerbody" targets "cursorraycast" newcmd "set_avoid" } { cmds "set_gfxmgr_level" targets "gfxsect_level" newcmd "assign_gfxmgr" } { cmds "set_state_display" targets "gfxport_display" newcmd "assign_state" } { cmds "set_state_world" targets "gfxport_world" newcmd "assign_state" } { cmds "set_state_sky" targets "gfxport_sky" newcmd "assign_state" } { cmds "set_sim_world" targets "inspperform_sim_world" newcmd "set_obj" } { cmds "set_sim_world" targets "cursorraycast" newcmd "set_sim" } { cmds "set_noise_world" targets "inspperform_noise_world" newcmd "set_obj" } { cmds "set_sensorstate_world" targets "inspperform_sensorstate_world" newcmd "set_obj" } { // Update camera transformation of world: cmds "set_camera_efftransf" targets "gfxport_world" newcmd "set_transf" } { // Click command: cmds "click" "set_cursor_x" "set_cursor_y" "move_cursor_x" "move_cursor_y" targets //"cursor" } { // Toggle frmtime information: cmds "toggle_frmtime" targets "inspfrmtime" newcmd "toggle_insp" } { // Toggle frmtime information: cmds "toggle_stat" "reset_stat" targets "inspfrmtime" } { cmds "reset_msg" targets "inspmsg" newcmd "reset" } { cmds "toggle_fullscreen" targets "gfxout" } { cmds "toggle_showgfxbound" targets "toggle_showgfxbound_sky" "toggle_showgfxbound_world" "toggle_showgfxbound_display" newcmd "perform" } { cmds "toggle_showgfxmesh" targets "toggle_showgfxmesh_sky" "toggle_showgfxmesh_world" "toggle_showgfxmesh_display" newcmd "perform" } { cmds "toggle_showgfxwire" targets "toggle_showgfxwire_sky" "toggle_showgfxwire_world" "toggle_showgfxwire_display" newcmd "perform" } { cmds "toggle_showgfxocclmesh" targets "toggle_showgfxocclmesh_sky" "toggle_showgfxocclmesh_world" "toggle_showgfxocclmesh_display" newcmd "perform" } { cmds "toggle_showgfxocclwire" targets "toggle_showgfxocclwire_sky" "toggle_showgfxocclwire_world" "toggle_showgfxocclwire_display" newcmd "perform" } { cmds "toggle_showphysbound" targets "toggle_showphysbound" newcmd "perform" } { cmds "toggle_showphysgeo" targets "toggle_showphysgeo" newcmd "perform" } { cmds "toggle_showphyscontact" targets "toggle_showphyscontact" newcmd "perform" } { cmds "toggle_shownoise" targets "toggle_shownoise" newcmd "perform" } { cmds "toggle_showsensorgeo" targets "toggle_showsensorgeo" newcmd "perform" } { cmds "toggle_showsensorbound" targets "toggle_showsensorbound" newcmd "perform" } { cmds "store_screenshot" targets "gfxeng" } // Paint sequence. // The following entry_array define the steps in correct order // which have to be performed for rendering a frame. { cmds "paint" targets "cursorraycast" newcmd "perform_raycast" } { cmds "paint" targets "gfxport_display" newcmd "perform" } { // Paint the general information. cmds "paint" targets "inspmem" newcmd "perform_insp" } { // Paint the general information. cmds "paint" targets "inspmsg" newcmd "perform_insp" } { // Paint the general information. cmds "paint" targets "inspgeneral" newcmd "perform_insp" } { // Finish the paint cycle. cmds "paint" targets "gfxeng" newcmd "perform_insp" } { // Finish the paint cycle. cmds "paint" targets "gfxout" newcmd "perform_insp" } { cmds "paint" targets "cursordisplay" newcmd "perform_insp" } { cmds "paint" targets "cursorraycast" newcmd "perform_insp" } { // Update per-frame information of the gfx engine. cmds "paint" targets "inspperform_sim_world" newcmd "perform_insp" } { cmds "paint" targets "inspperform_noise_world" newcmd "perform_insp" } { // Update per-frame information of the gfx engine. cmds "paint" targets "inspperform_sensorstate_world" newcmd "perform_insp" } { // Paint the inspfrmtime last: cmds "paint" targets "inspfrmtime" newcmd "perform_insp" } { // Draw the per-frame information. cmds "paint" targets "insppaint" newcmd "paint" } { // Finish the paint cycle. cmds "paint" targets "gfxeng" newcmd "end_render" } { cmds "paint" targets "gfxout" newcmd "present" } } } { // 3D graphics engine: ident "kit_io.gfxeng" param { name "gfxeng" active 1 extcfg_actor "^^^cfg" extcfg_entry_param "gfxeng" extcfg_entry_insp_stat_enabled "insp.gfxstat" inspcollect "^^inspcollect" given_array { item "^^^envcompsuppl" given_ident "envcompsuppl" } { item "^^^env" given_ident "env" } } } { // 3D graphics engine: ident "kit_io.gfxout" param { ctx "^ctx" gfxeng "gfxeng" name "gfxout" active 1 extcfg_actor "^^^cfg" extcfg_entry_param "gfxout" extcfg_entry_insp_base_enabled "insp.gfxbase" inspcollect "^^inspcollect" } } { ident "kit_engbase.gfxctx" param { name "gfxctx" gfxeng "gfxeng" extcfg_actor "^^^cfg" extcfg_entry_featureset "feature_set" } } { // 3D graphics engine: ident "kit_engbase.gfxsect" param { name "gfxsect_display" gfxctx "gfxctx" gfxmgr_actor "^^display" gfxmgr_cmd "get_display_gfxmgr" } } { // 3D graphics engine: ident "kit_engbase.gfxsect" param { name "gfxsect_level" gfxctx "gfxctx" gfxmgr_actor "" gfxmgr_cmd "" } } { // Painting per-frame information lines. ident "kit_engbase.insppaint" param { name "insppaint" inspcollect "^^inspcollect" gfxctx "gfxctx" tex_suppl "^^^basesuppl" tex_ident "tex:client/texture/charset.tga" extcfg_actor "^^^cfg" extcfg_entry_chunk "insp.paint" } } { // Reporting general information. ident "kit_base.inspmsg" param { name "inspmsg" inspcollect "^^inspcollect" extcfg_actor "^^^cfg" extcfg_entry_insp "insp.msg" extcfg_entry_limit "insp.msg_limit" extcfg_entry_alsoinfo "insp.msg_alsoinfo" } } { // Reporting general information. ident "kit_base.inspgeneral" param { name "inspgeneral" inspcollect "^^inspcollect" extcfg_actor "^^^cfg" extcfg_entry_insp "insp.general" } } { // frmtime calculation actor. ident "kit_base.inspfrmtime" param { name "inspfrmtime" inspcollect "^^inspcollect" extcfg_actor "^^^cfg" extcfg_entry_insp "insp.frmtime" extcfg_entry_logfile "insp.frmtime_logfile" } } { // ident "kit_base.inspmem" param { name "inspmem" inspcollect "^^inspcollect" extcfg_actor "^^^cfg" extcfg_entry_insp "insp.mem" } } { ident "kit_engbase.gfxport" param { name "gfxport_sky" active 1 gfxout "gfxout" gfxctx "gfxctx" next "" couple 0 state_actor "" state_cmd "" gfxstat "gfxstat" extcfg_actor "^^^cfg" extcfg_entry_proj "proj_world" extcfg_entry_param "gfxport" //extcfg_entry_eyedist "eyedist.display" view_transl_x 0.00 view_transl_y 0.00 view_scale_x 1.00 view_scale_y 1.00 view_depth_start 0.99 view_depth_end 1.00 // Use orthogonal projection. proj_ortho 0 // View frustum extension. // These values are plane slopes in case of a persepctive // projection, and coordinates otherwise. // If all set to zero, read from cfguration file instead. proj_open_x 0.0 proj_open_y 0.0 proj_center_x 0.0 proj_center_y 0.0 // Clipping plane coordinates. proj_neg_z 0.05 proj_pos_z 1000.0 // Fog: fog_color 0.5 0.5 0.5 //fog_density 0.02 destprop_antialias 1 clear_must_coloralpha 1 clear_color 0.0 0.0 0.0 enum_trigger "main_trigger" } } { ident "kit_engbase.gfxport" param { name "gfxport_world" active 1 gfxout "gfxout" gfxctx "gfxctx" next "gfxport_sky" couple 1 // Sky is coupled state_actor "" state_cmd "" gfxstat "gfxstat" extcfg_actor "^^^cfg" extcfg_entry_proj "proj_world" extcfg_entry_param "gfxport" //extcfg_entry_eyedist "eyedist.display" view_transl_x 0.00 view_transl_y 0.00 view_scale_x 1.00 view_scale_y 1.00 view_depth_start 0.01 view_depth_end 0.99 // Use orthogonal projection. proj_ortho 0 // View frustum extension. // These values are plane slopes in case of a persepctive // projection, and coordinates otherwise. // If all set to zero, read from cfguration file instead. proj_open_x 0.0 proj_open_y 0.0 proj_center_x 0.0 proj_center_y 0.0 // Clipping plane coordinates. proj_neg_z 0.05 proj_pos_z 1000.0 // Fog: fog_color 0.5 0.5 0.5 //fog_density 0.02 destprop_antialias 1 clear_must_coloralpha 1 clear_color 0.0 0.0 0.0 enum_trigger "main_trigger" } } { ident "kit_special.raycast" param { name "raycast_cursor" } } { ident "kit_special.cursordisplay" param { name "cursordisplay" cursor_actor "dispatch_export" cursor_cmd "set_cursor_pos_xyz" extcfg_actor "^^^cfg" extcfg_entry_param "gfxeng" extcfg_entry_insp_stat_enabled "insp.cursor" inspcollect "^^inspcollect" } } { ident "kit_special.cursorraycast" param { name "cursorraycast" cursordisplay_src "cursordisplay" cursordisplay_cmd "get_cursor_xy" proj_src "gfxport_world" proj_cmd "get_proj" transf_src "gfxport_world" transf_cmd "get_transf" raycast_actor "raycast_cursor" raycast_cmd "perform_raycast" ray_start_z -1.0 ray_end_z 1.0 extcfg_actor "^^^cfg" extcfg_entry_param "gfxeng" extcfg_entry_insp_stat_enabled "insp.cursor" inspcollect "^^inspcollect" } } { ident "kit_engbase.gfxport" param { name "gfxport_display" active 1 gfxout "gfxout" gfxctx "gfxctx" next "gfxport_world" couple 0 state_actor "^^display" state_cmd "get_display_state" gfxstat "gfxstat" extcfg_actor "^^^cfg" extcfg_entry_proj "proj_display" extcfg_entry_param "gfxport" //extcfg_entry_eyedist "eyedist.display" view_transl_x 0.00 view_transl_y 0.00 view_scale_x 1.00 view_scale_y 1.00 view_depth_start 0.00 view_depth_end 0.01 proj_ortho 1 proj_open_x 0.0 proj_open_y 0.0 proj_center_x 0.0 proj_center_y 0.0 proj_neg_z -1.0 proj_pos_z 1.0 fog_color 0.5 0.5 0.5 //fog_density 0.02 destprop_antialias 1 clear_must_coloralpha 1 clear_color 0.0 0.0 0.0 enum_trigger "main_trigger" } } { ident "kit_engbase.inspperform" param { name "inspperform_sim_world" inspcollect "^^inspcollect" gfxport "gfxport_world" obj "" } } { ident "kit_engbase.inspperform" param { name "inspperform_noise_world" inspcollect "^^inspcollect" gfxport "gfxport_world" obj "" } } { ident "kit_engbase.inspperform" param { name "inspperform_sensorstate_world" inspcollect "^^inspcollect" gfxport "gfxport_world" obj "" } } { ident "kit_base.paramstr" param { name "toggle_showgfxbound_sky" target "gfxport_sky" cmd "toggle_mode_flag" param "showbound" } } { ident "kit_base.paramstr" param { name "toggle_showgfxbound_world" target "gfxport_world" cmd "toggle_mode_flag" param "showbound" } } { ident "kit_base.paramstr" param { name "toggle_showgfxbound_display" target "gfxport_display" cmd "toggle_mode_flag" param "showbound" } } { ident "kit_base.paramstr" param { name "toggle_showgfxmesh_sky" target "gfxport_sky" cmd "toggle_mode_flag" param "showmesh" } } { ident "kit_base.paramstr" param { name "toggle_showgfxmesh_world" target "gfxport_world" cmd "toggle_mode_flag" param "showmesh" } } { ident "kit_base.paramstr" param { name "toggle_showgfxmesh_display" target "gfxport_display" cmd "toggle_mode_flag" param "showmesh" } } { ident "kit_base.paramstr" param { name "toggle_showgfxwire_sky" target "gfxport_sky" cmd "toggle_mode_flag" param "showwire" } } { ident "kit_base.paramstr" param { name "toggle_showgfxwire_world" target "gfxport_world" cmd "toggle_mode_flag" param "showwire" } } { ident "kit_base.paramstr" param { name "toggle_showgfxwire_display" target "gfxport_display" cmd "toggle_mode_flag" param "showwire" } } { ident "kit_base.paramstr" param { name "toggle_showgfxocclmesh_sky" target "gfxport_sky" cmd "toggle_mode_flag" param "showocclmesh" } } { ident "kit_base.paramstr" param { name "toggle_showgfxocclmesh_world" target "gfxport_world" cmd "toggle_mode_flag" param "showocclmesh" } } { ident "kit_base.paramstr" param { name "toggle_showgfxocclmesh_display" target "gfxport_display" cmd "toggle_mode_flag" param "showocclmesh" } } { ident "kit_base.paramstr" param { name "toggle_showgfxocclwire_sky" target "gfxport_sky" cmd "toggle_mode_flag" param "showocclwire" } } { ident "kit_base.paramstr" param { name "toggle_showgfxocclwire_world" target "gfxport_world" cmd "toggle_mode_flag" param "showocclwire" } } { ident "kit_base.paramstr" param { name "toggle_showgfxocclwire_display" target "gfxport_display" cmd "toggle_mode_flag" param "showocclwire" } } { ident "kit_base.paramstr" param { name "toggle_showphysbound" target "gfxport_world" cmd "toggle_mode_flag" param "showphysbound" } } { ident "kit_base.paramstr" param { name "toggle_showphysgeo" target "gfxport_world" cmd "toggle_mode_flag" param "showphysgeo" } } { ident "kit_base.paramstr" param { name "toggle_showphyscontact" target "gfxport_world" cmd "toggle_mode_flag" param "showphyscontact" } } { ident "kit_base.paramstr" param { name "toggle_shownoise" target "gfxport_world" cmd "toggle_mode_flag" param "shownoise" } } { ident "kit_base.paramstr" param { name "toggle_showsensorbound" target "gfxport_world" cmd "toggle_mode_flag" param "showsensorbound" } } { ident "kit_base.paramstr" param { name "toggle_showsensorgeo" target "gfxport_world" cmd "toggle_mode_flag" param "showsensorgeo" } } } }