• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

FSW SDK

n4gix

Resource contributor
#22
There is barely a mention of them Ed. I've been tasked with seeing just how difficult it will be to migrate one of our simpler GA projects into FSW. So far I'm not too sanguine about the end result.
 

WebSimConnect

Resource contributor
#23
I noticed nothing regarding C/C++ based gauges. Did I miss it?
They published gauges.h and simconnect.lib. I did not invest my time in checking what has changed in gauges.h but my simple DLL gauge crash before reaching DLLStart function.

What is interesting that gauge callback extra_data parameter is still 32 bit in x64 architecture !!!!

FSAPI Callback(GAUGEHDR* gau, SINT32 serviceId, UINT32 extra_data);

so forget using extra_data to store pointers as in Microsoft's esp drawing gauges gdi example.
 

ddawson

Resource contributor
#24
I actually changed the Callback definition to include a UINT64 as the third argument, rather than a UINT32.
I can get the gauge to load (I can see the tooltip drawn on the screen) but the gauge itself does not appear and its mouse function is never called.
I suspect that this has to do with the format of the bitmap files themselves, but without any documentation it seems pointless to try to debug this issue.
 

n4gix

Resource contributor
#25
Doug, perhaps some hint might come from how XML bitmaps are now required to be .dds format. Is it possible that is the case with C++ gauges now as well?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#27
Dxtbmp or imagetool are the most used tools. Imagetool normally comes with the sdk (although not with the FSW one).
 

ddawson

Resource contributor
#30
Using VS2015, not that it should matter unless one is linking against a version dependent lib file.
I can attach the debugger to FSW, thereby discovering that while my custom tooltip is being drawn on the screen, the gauge has not remained in memory.
 
#31
I've been playing with the FuelPressure.xml from the FSX SDK converted with GaugeConverter.exe from the FSW SDK.
Using this panel entry I got the gauge working in 2d.

[Window06]
Background_color=0,0,0
size_mm=100,80
window_size_ratio=1
position=0
visible=0
ident=11002
render_d3d=1
use_emissive=1
gauge00=TestGauges!FuelPressure_d3d, 0,0,100,80

however I can't see it at all in the VC.

[VCockpit01]
size_mm=1024,1024
pixel_size=1024,1024
background_color=0,0,0
texture_diffuse=$C172s_1
texture_emissive=$C172s_1
render_d3d=1
num_mips=4
gauge00=TestGauges!FuelPressure_d3d, 0, 51


Does anyone have any idea why not?
 
#32
I should have pointed out I'm trying to build a radio stack for the FSX c172 running in FSW and testing with this simple gauge.
I uploaded the gauge to the gauge forum.