This shows you the differences between two versions of the page.
|
pc:software:xplane11:garming5:start [2019/03/06 18:44] dwheele created |
pc:software:xplane11:garming5:start [2019/03/07 02:41] (current) dwheele |
||
|---|---|---|---|
| Line 4: | Line 4: | ||
| Started work on a Garmin G5 panel to work with X-Plane 11. | Started work on a Garmin G5 panel to work with X-Plane 11. | ||
| + | |||
| + | ===== Creating a 3D Panel ===== | ||
| + | |||
| + | It took a while to create a 3D Panel. The documentation for the X-Plane, although long, doesn' | ||
| + | |||
| + | ==== C++ Impacts ==== | ||
| + | |||
| + | I created a DLL according to an example. Inside, it has these 5 functions which must be implemented: | ||
| + | |||
| + | <code c++> | ||
| + | PLUGIN_API int XPluginStart( | ||
| + | char * outName, | ||
| + | char * outSig, | ||
| + | char * outDesc) | ||
| + | PLUGIN_API void XPluginStop(void) | ||
| + | PLUGIN_API void XPluginDisable(void) { } | ||
| + | PLUGIN_API int XPluginEnable(void) { return 1; } | ||
| + | PLUGIN_API void XPluginReceiveMessage(XPLMPluginID inFrom, int inMsg, void * inParam) { } | ||
| + | </ | ||
| + | |||
| + | Within XPluginStart is this initialization: | ||
| + | |||
| + | params is a struct with various pointers, mostly to mouse, clicks, keyboard listening functions which must be implemented, | ||
| + | |||
| + | Then I call this: | ||
| + | |||
| + | <code c++> | ||
| + | XPLMRegisterDrawCallback(& | ||
| + | </ | ||
| + | where '' | ||
| + | |||
| + | ==== Requirements to draw and make a 3D Instruments ==== | ||
| + | |||
| + | However, it doesn' | ||
| + | |||
| + | * the Panel_Fighter.png file is the texture file for the Cockpit Object. | ||
| + | * The Cockpit Object is indicated as **Int Cockpit** in Plane Maker | ||
| + | * There is something (for me, the G5 screen) that is mapped to a texture connected to that Panel_Fighter.png | ||
| + | * The Checkbox "Part Of Cockpit Panel" needs to be checked in Texture -> XPlane -> Cockpit Panel -> Part Of Cockpit Panel. Not sure how the '' | ||