Plugin SDK Sample Code

Title Date Description
Crash Handling 2 Jun 2020 Example demonstrating how to save useful debugging information for crashes caused by a plugin
Overriding TCAS 8 May 2020
Drawing 2-D That Matches the 3-D world 2 Apr 2020 An example of how to draw 2-d graphics that match the 3-d world.
VR Window Sample 7 Mar 2018 Demonstrates creating a window, moving it to VR, and changing its size based on a button click.
SDK 3.0 Window Scissoring Sample 21 Nov 2017 Demonstrates the use of the modelview, viewport, and projection matrix datarefs for applying scissoring to SDK 3-style windows.
Hello World (SDK 3) 24 Oct 2017 "My first plugin." Creates a window to show the text "Hello World!"
X-Plane 10 Instancing Compatibility Wrapper 31 Aug 2017 Compatibility wrapper for using the new XPLMInstance APIs in plugins that support old versions of X-Plane.
X-Plane 11 Instanced Drawing Sample 31 Aug 2017 This sample shows off the new instancing API, used for efficiently drawing objects without needing to write OpenGL.
X-Plane Menu SDK Sample 28 Jun 2017 A basic demonstration for adding submenus to the in-sim Plugin menu.
X-Plane 11 Window Gravity Sample 28 Jun 2017 Creates a window that is dynamically resized based on the X-Plane window's size.
X-Plane 11 Window API Sample 28 Jun 2017 Creates a new, "modern" window styled like an X-Plane 11 window which supports multiple monitors and pop-out into its own OS window.
X-Plane 11 Map API Sample 27 Jun 2017 Draws custom map layers using pure OpenGL, PNG icons, and text labels.
TextureDraw 5 Dec 2014 This code snippet shows how to load a texture and draw it as a 2D quad.
TextFieldFilters 5 Dec 2014 This code snippet shows how to attache control V, C, and X as cut/copy/paste.
Fast Culling 5 Dec 2014 This code snippet can be used to determine if a sphere at a location in the current OpenGL coordinates is visible.
ClickingIn3D 5 Dec 2014 This code snippet saves the 2d mouse click and outputs it as two 3-d points.
Billboards 5 Dec 2014 This is a code snippet that returns up to 3 camera directions in OpenGL coordinates.
ArrayDataRef 4 Dec 2014 This is a code snippet that shows how to write custom array dataref handlers.
Register Custom DataRef in Dataref Editor 4 Dec 2014 This plugin adds a few lines of code and a flight loop callback. The flight loop callback sends the message to DataRefEditor to register your custom dataref in DataRefEditor.
Draw Terrain Object 4 Dec 2014 This sample code shows how to draw a terrain object that moves in relation to the aircraft
Custom Manipulator Controlling X-Plane 15 Nov 2014 This sample illustrates control of X-Plane DataRefs using custom manipulators.
Custom Command with Custom DataRef 7 Nov 2014 This example program creates a custom integer dataref and 2 custom commands.
Custom Command 7 Nov 2014 This example program illustrates creating a custom command.
Create Instructions Widget 7 Nov 2014 This example shows how to use a pulldown menu to create a widget window to display a list of instructions or notes.
AcquirePlaneTest 7 Nov 2014 A quick test of airplane acquisition.
OpenAL Shared Example 28 Dec 2012 This sample code demonstrates how to use OpenAL with a context from a plugin.
TimedProcessing 4 Dec 2012 This example plugin demonstrates how to use the timed processing callbacks to continuously record sim data to disk.
SimData 4 Dec 2012 This example creates menus items that change the nav-1 radio frequency to demonstrate how to interact with X-Plane by reading and writing data.
ShareData 4 Dec 2012 This is an example plugin that demonstrates how to share data, both owned by a plugin and shared.
Position 4 Dec 2012 This sample is a plug-in that allows positioning of lat/lon etc.
Override 4 Dec 2012 This sample shows how to use the "override" datarefs to disable X-Plane's internal control of things like the flight model and joystick controls.
OpenAL Example 4 Dec 2012 This sample plugin plays a sound whenever an airplane is loaded. It demonstrates how to use OpenAL with a context from a plugin.
ManagePlugins 4 Dec 2012 This sample demonstrates how to manage other plugins.
KeySniffer 4 Dec 2012 This example shows the use of key sniffers to intercept and process raw keystrokes.
EngineStarter 4 Dec 2012 This examples shows how to start the engines via plugin.
DrawAircraft 4 Dec 2012 This examples shows how to draw 7 AI aircraft around the user aircraft.
Custom Prop Disc 15 Nov 2012 This sample shows how to create a plugin to drive a custom prop disc.
Control 7 Nov 2012 This sample shows how to control lat/long, etc.
CommandSim 7 Nov 2012 This sample demonstrates how to send commands to the sim. Commands allow you to simulate any keystroke or joystick button press or release.
Camera 7 Nov 2012 This sample shows how to register a new view with the sim that orbits the aircraft.
Beacons and Strobes 7 Nov 2012 This sample shows how to override X-Plane's default flash patterns for the beacons and strobes.
SDK210Tests 25 Jan 2012 This sample tests SDK 2.10 functions.
MotionPlatformData 4 Dec 2007 Plugin to show how to derive motion platform data from datarefs.
SDK200Tests 20 Nov 2007 This sample tests SDK 2.00 functions.
FMSUtility 4 Dec 2005 This examples shows how to access the FMS via plugin.
ReloadPlugins 4 Dec 2004 This example shows how reload plugins so you don't have to quit X-Plane.
TestWidgets 21 Feb 2003 This example shows how to create 2 custom widgets which are then used by the plugin.