algerad3 Posted January 28, 2016 Posted January 28, 2016 Question: in the export .lua did the functions "LoSetSharedTexture(name)" ,"LoRemoveSharedTexture(name)"and "LoUpdateSharedTexture(name)" stop working or get deprecated? With the new engine I tried to get it working and no such luck.... Maybe I am doing something wrong. [sIGPIC][/sIGPIC] CPIAS FOR Saitek: Saitek Flight instrument panels and X-52 pro mfd scripts for Dcs http://forums.eagle.ru/showthread.php?t=94174
tacno Posted February 6, 2016 Posted February 6, 2016 I'm interested by the answer too. I can not access to the memory mapped "mfd0" According to -- you can export render targets via shared memory interface -- using next functions -- LoSetSharedTexture(name) -- register texture with name "name" to export -- LoRemoveSharedTexture(name) -- copy texture with name "name" to named shared memory area "name" -- LoUpdateSharedTexture(name) -- unregister texture -- texture exported like Windows BMP file -- -------------------------------- -- |BITMAPFILEHEADER | -- |BITMAPINFOHEADER | -- |bits | -- -------------------------------- -- sample textures : "mfd0" - full SHKVAL screen -- "mfd1" - ABRIS map screen -- "mfd2" - not used -- "mfd3" - not used -- "mirrors" - mirrors sMyFunction= { UpdatePeriod = 5; UpdateTime = 0; -- ------------------- -- S T A R T PROCEDURE StartProc=function(self) LoSetSharedTexture("mfd0") end, -- -------------- -- U P D A T E UpdateProc=function(self) local CurrentTime=LoGetModelTime() if CurrentTime >= self.UpdateTime then self.UpdateTime = CurrentTime + self.UpdatePeriod; LoUpdateSharedTexture("mfd0") end end, -- ----------------------------- -- S T O P EndProc=function(self) LoRemoveSharedTexture("mfd0") end, } -- ****************************************************************************************************** -- Works once just before mission start. do local PrevLuaExportStart=LuaExportStart; LuaExportStart=function() sMyFunction:StartProc(); if PrevLuaExportStart then PrevLuaExportStart(); end end end -- Works just after every simulation frame. do local PrevLuaExportAfterNextFrame=LuaExportAfterNextFrame; LuaExportAfterNextFrame=function() sMyFunction:UpdateProc() if PrevLuaExportAfterNextFrame then PrevLuaExportAfterNextFrame() end end end -- Works once just after mission stop. do local PrevLuaExportStop=LuaExportStop; LuaExportStop=function() sMyFunction:EndProc() if PrevLuaExportStop then PrevLuaExportStop() end end end UniversRadio for DCS : http://universradio.fr Homepit on eagle.ru forum :http://forums.eagle.ru/showpost.php?p=1547848&postcount=1 (more details : http://www.tacnoworld.fr) 3rd-Wing.net/75th vFighter "Tiger Sharks"/S-01 Tacno (squadron commander)
Recommended Posts