dofile(LockOn_Options.script_path.."MPCD/indicator/MPCD_definitions.lua")
dofile(LockOn_Options.script_path.."MPCD/indicator/MENU/MPCD_BG.lua")

-- Video Output
local szh 	 = 1
local szw    = 1
local verts  =	{
	{-szw,  szh},
	{ szw,  szh},
	{ szw, -szh},
	{-szw, -szh}
}

local	scr_background          = CreateElement "ceMeshPoly"
		scr_background.name	    = "scr_background"
		scr_background.init_pos	= {0, 0, 0}
		scr_background.vertices	= verts
		scr_background.indices	= {0,1,2 ; 0,2,3}
		scr_background.material	= MakeMaterial(nil, {0,0,0,255})
		Add_MPCD_Element(scr_background)
		
local	frame				= CreateElement "ceMeshPoly"
		frame.name			= "fr"
		frame.primitivetype	= "lines"
		frame.material		= MakeMaterial(nil,{0,0,0,255})
		frame.vertices		= verts
		frame.indices		= {0,1,1,2,2,3,3,0}
		Add_MPCD_Element(frame)

local	FLIR_RENDER				= CreateElement "ceTexPoly"
		FLIR_RENDER.name		= "FLIR_RENDER"
		FLIR_RENDER.init_pos	= {0.0, 0.0, 0.0}
		FLIR_RENDER.vertices	= verts
		FLIR_RENDER.indices		= {0, 1, 2, 0, 2, 3}
		FLIR_RENDER.tex_coords 	= {{0,0},{1,0},{1,1},{0,1}}
		FLIR_RENDER.material	= "render_target_"..tostring(GetRenderTarget() + 1)--GetRenderTarget will return index of assigned RT for this device(starting with 0)
		FLIR_RENDER.controllers	= {{"TPOD_Video_enabled"}}
		Add_MPCD_Element(FLIR_RENDER)


local	scr_frame_top				= CreateElement "ceMeshPoly"
		scr_frame_top.name			= "scr_frame_top"
		scr_frame_top.init_pos		= {0, 0.0, 0}
		scr_frame_top.vertices		= verts
		scr_frame_top.indices		= {0,1,2 ; 0,2,3}
		scr_frame_top.material		= MakeMaterial(nil, {0,0,0,255})
		scr_frame_top.controllers	= {{"TPOD_Limits_Top", 0.135}}
		Add_MPCD_Element(scr_frame_top)

local	tpod_snsr_head				= create_tpod_textured_box( 107, 21, 128, 43)
		tpod_snsr_head.name			= "tpod_snsr_head"
		tpod_snsr_head.init_pos		= {0, 0.85, 0}
		tpod_snsr_head.controllers	= {{"tpod_look_indicator"}}
		Add_MPCD_Element(tpod_snsr_head)
