function gadget:GetInfo()
  return {
	 name = "GLSL Lighting",
	 desc = "The P.U.R.E. GLSL Realtime lighting implementation.",
	 author = "Argh",
	 date = "November 7, 2008",
	 license = "Public Domain, or the least-restrictive rights in your country of residence",
	 layer = -20,
	 enabled  = true -- loaded by default?
  }
end

if (gadgetHandler:IsSyncedCode()) then
----------------------------------------------------------------------------------------------------------SYNCED
local function CreateLightMe(u, ud, team, p, r, g, b, a)
	p = Spring.GetUnitScriptPiece(u,p)
	r = r / 255
	g = g / 255
	b = b / 255
	a = a / 255
	--SendToUnsynced("CreateLight",u, ud, team, p, r, g, b, a)
	Spring.SendLuaUIMsg("CreateLight"..'u='..u..';'..'p='..p..';'..'r='..r..';'..'g='..g..';'..'b='..b..';'..'a='..a..';')
end

local function DestroyLightMe(u, ud, team)
	Spring.SendLuaUIMsg("DestroyLight"..'u='..u..';')
	--SendToUnsynced("DestroyLight",u, ud, team)
end

function gadget:Initialize()
	gadgetHandler:RegisterGlobal("CreateLightMe", CreateLightMe)
	gadgetHandler:RegisterGlobal("DestroyLightMe", DestroyLightMe)
end

function gadget:UnitDestroyed(u,ud,team)
	SendToUnsynced("DestroyLight",u, ud, team)
end
end