• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v2 C++ complex gauge multi screen

Messages
913
Country
indonesia
first of all i'm beginners modeler, programmer.
i build gauge C++ from Dai Griffiths gauge tutorials,
use example from dai, SDK, and some examples or advice can I use from this thread ( i find and read till page 29- sorry not to read all thread) to build my gauge. till now working good

i need help for make multi-screen gauge ( each screen have complex gauge tree)!
how to change 1 screen to another screen, 1 screen active another screen hiding.

in XML i just use <visibility> in the top of tree and sub tree below it will be follow.

how about in C++?
i have 4 screen in 1 gauge, PFD, NAV, FUEL, EICAS

:pushpin:i can use ( have not tried yet)
from bill, using the twin macros from gauges.h, SHOW_IMAGE and HIDE_IMAGE

if ( HSIpower == 1 ) { SHOW_IMAGE(pelement) ; } else { HIDE_IMAGE(pelement) ; }
sprintf(pelement->string,"HDG %03.0f",rwert);

if i use complex macros, this will be much should i do (each element)
simple way is great ( sometimes simple not easy) :scratchch

thanks.
 
Messages
913
Country
indonesia
some people suggest to use GDI+/D2D, why i not using that? because there no tutorial and example available ( i'm still beginner, need guidance ).
in C++, i still trying to figure out.
GDI+/D2D seems quite promising, some tutorial will be great to start.

this my project gauges i was working on. 1 screen done, another screen waiting.
 

Attachments

  • 2015-5-14_22-21-51-657.jpg
    2015-5-14_22-21-51-657.jpg
    43.3 KB · Views: 506

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
You got Skype? It takes a little more than a tutorial....I would be happy to walk you through the basics.
 
Messages
913
Country
indonesia
I'm afraid can not use skype, my bandwidth very limited.

but it is an interesting offer, possibly with a step by step video tutorial is pretty good.
so I can repeat again and again if the project is carried out there is a problem.
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
You should be able to. No need to do actual voice calls. Use the Skype text chat. My bandwidth is also low but I can manage.
 

cheangjc

Resource contributor
Messages
111
Country
singapore
I would strongly recommend you attempt the direct2d tutorials before attempting a full scale gauge.

This is coming from someone who used D2D for a complex gauge.
 
Messages
913
Country
indonesia
for a while I will keep using C++ until I understand it, then I'm going to expand to another program.
 

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
I was actually thinking start with GDI+ as it is easier to understand and you can use it in that example I posted. Do get hold of Skype though. There is nothing like personal one on one real time help.
 

cheangjc

Resource contributor
Messages
111
Country
singapore
I can also offer some help on Skype if you need it. I think since we are in the same time zone, it will be easier to find me.
 
Messages
913
Country
indonesia
wow,this very good offer.
I'm not holding back, I just need a clear path, where I will be heading

but,the first thing I'm going to find out about the GDI+ / D2D! or you can explain (short explain) why using GDI+ rather than C++.
in C++ i'm still in the dark, moreover GDI+/D2D.

Using C++ in my gauge (MV-22B/ CV-22B) there many features, Camera view, map, IR radar. from your experience whether it would be easier to using GDI+.
I put all the gauge is in VC.
i start building from simple one, just only one, then slowly increasing to the complex one (Bill Leaming advice).
could you please give a sample, short sample and simple, just need *.h, *.cpp

from your template, there many file to "include" for creating just simple one( maybe just "make static"), and just for check its working or not.
or this GDI+ just like C++, i dont know ........

some searching on web, so with this GDI no need image ( make fps drop). so where i start drawing. X, Y, Z.
 
Last edited:

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
Ok first of all, GDI+ is just a graphics library that was built using C++.
Second, GDI+ allows far more freedom in what you can draw using vectors (lines, rectangles, polygons, ellipses, and other primitive shapes) and in many ways makes things easier (fewer lines of code thanks to using loops and such) than the purely bitmap based approach of the fsx gauge macros.

There is only 1 MAKE_STATIC macro used for each gauge and it covers the whole surface of the gauge. It provides the surface which GDI+ can be used to procedurally draw on.

The template I sent doesn't have any rendering code in it (its just a blank template) but it does show how to set up a separate thread for your rendering which will effectively eliminate fps drop. Get Skype and we can walk you through the steps.
 
Messages
913
Country
indonesia
wait, i still trying using skype, it wont connect. more than 2 year i'm not using it. :banghead:
 
Messages
913
Country
indonesia
correct, done. so where to start

naruto-kun there so many name on skype.
cheangjc just only one, hope it correct person
 
Last edited:
Messages
913
Country
indonesia
SLOW BUT SURE
thanks to Naruto-kun
many modification has been done. this GDI+ better graphics than native C ++ ( from FSX SDK tutorials). The hard one is there no much tutorials and sample creating gauge in GDI+ available on the net, so always ask to Naruto-Kun.

Left gauge is GDI+
Right gauge still using native C++
2015_7_20_21_43_39_299.jpg


edit : added attachment file
 

Attachments

  • 2015-7-20_21-43-39-299.jpg
    2015-7-20_21-43-39-299.jpg
    104.8 KB · Views: 426
Last edited:
Messages
913
Country
indonesia
80 % for PFD all rewrite to GDI+
map using modified b737 gauge

see the different smooth graphics



from my earlier issue i had solved that problem and i had 5 working menu on my gauge, with GDI+ output size also smaller than i build gauge for the first time using C++.
 
Last edited:
Top