towsim Posted March 17, 2012 Posted March 17, 2012 Hi all, since a couple of days I try to export theA-10 MFD textures to a shared memory. function LuaExportStart() LoSetSharedTexture("mfd0") end function LuaExportAfterNextFrame() LoUpdateSharedTexture("mfd0") end function LuaExportStop() LoRemoveSharedTexture("mfd0") end The shared memory seems to be created correctly because I get a valid handle from OpenFileMapping with "mfd0" in my private application. My problem is, that the shared memory, returned by MapViewOfFile, is never filled with bit map data. It is only filled with zeros and does not change during the session. Does anybody have experience with exporting the MFDs and knows probably the reason for my problem? Thanks Mike [sIGPIC][/sIGPIC]
boarder2 Posted March 18, 2012 Posted March 18, 2012 Hi all, since a couple of days I try to export theA-10 MFD textures to a shared memory. function LuaExportStart() LoSetSharedTexture("mfd0") end function LuaExportAfterNextFrame() LoUpdateSharedTexture("mfd0") end function LuaExportStop() LoRemoveSharedTexture("mfd0") end The shared memory seems to be created correctly because I get a valid handle from OpenFileMapping with "mfd0" in my private application. My problem is, that the shared memory, returned by MapViewOfFile, is never filled with bit map data. It is only filled with zeros and does not change during the session. Does anybody have experience with exporting the MFDs and knows probably the reason for my problem? Thanks Mike It doesn't work and seems that it never will. If anyone can convince ED to fix it I'd be a super happy camper! iControl DCS/DCS Virtual Cockpit - Full featured iPad Cockpit - Now with Android support! A10 Virtual Cockpit Free - Free limited functionality version of iControl DCS! DCS Virtual Cockpit - Android version! Follow on Twitter for all the latest news
towsim Posted March 18, 2012 Author Posted March 18, 2012 Is this bug in the current A-10 version only? Because I found a lot of threads describing the method with success. Not the best expressed in FPS and color, but at least there was a result. Nevertheless, it helps a lot to know that I was on the right way to nowhere... Thanks and Regards Mike [sIGPIC][/sIGPIC]
boarder2 Posted March 18, 2012 Posted March 18, 2012 Is this bug in the current A-10 version only? Because I found a lot of threads describing the method with success. Not the best expressed in FPS and color, but at least there was a result. Nevertheless, it helps a lot to know that I was on the right way to nowhere... Thanks and Regards Mike Everything I saw about it working has only been in LOMAC threads. I don't think I've ever seen a DCS thread where it actually worked. Take a look here at a thread I started just over a year ago. http://forums.eagle.ru/showthread.php?t=69823 I do really, really wish ED would make these functions work again because it'd make iControl so much better! iControl DCS/DCS Virtual Cockpit - Full featured iPad Cockpit - Now with Android support! A10 Virtual Cockpit Free - Free limited functionality version of iControl DCS! DCS Virtual Cockpit - Android version! Follow on Twitter for all the latest news
Gadroc Posted March 18, 2012 Posted March 18, 2012 As far as I know it's never worked in DCS A-10C. It did work in DCS Black Shark 1, but only the raw 3D scene for the shkval and only the map portion of the ABRIS came through. The text overlays did not, in addition the colors where off. If I remember correctly the headers where off on the export as well, it did not contain the right size bitmap header. I never resolved the issues as the performance hit was to great to make it worth while, at least in Black Shark at the time. I have not tried with Black Shark 2 as I assumed it would not work at all since it back ported the DCS A-10C engine.
towsim Posted March 18, 2012 Author Posted March 18, 2012 (edited) Many thanks for the answers. So I can stop this evaluation. Regards Mike What I was just thinking of: What I do not understand is the impact on FPS. If I observe the performance diagram on my computer (3 view channels + 2 MFD monitors) the CPUs idle any what between 7% and 9% while the graphics adapters produces only 5 - 7 FPS. So the bottleneck are the graphics adapters. I would not believe, that the MFDs are made as shader modules. If they reside in the main memory it normally should not eat any performance to exort them to a shared memory. Edited March 18, 2012 by towsim Another miracle [sIGPIC][/sIGPIC]
Gadroc Posted March 19, 2012 Posted March 19, 2012 Many thanks for the answers. So I can stop this evaluation. Regards Mike What I was just thinking of: What I do not understand is the impact on FPS. If I observe the performance diagram on my computer (3 view channels + 2 MFD monitors) the CPUs idle any what between 7% and 9% while the graphics adapters produces only 5 - 7 FPS. So the bottleneck are the graphics adapters. I would not believe, that the MFDs are made as shader modules. If they reside in the main memory it normally should not eat any performance to exort them to a shared memory. They are full 3d Camera's into the game world (TGP and Maverick Cameras), which would normally reside in video card memory. Copying them to main memory for a shared memory area is very expensive. Reading from video memory is not very optimized (drivers / hardware are optimized to write pixels not read them), also I imagine that bandwidth to / from the video card would be the biggest bottleneck.
Recommended Posts