Plugin SDK Sample Code

TitleDateDescription
VR Window Sample7 Mar 2018Demonstrates creating a window, moving it to VR, and changing its size based on a button click.
SDK 3.0 Window Scissoring Sample21 Nov 2017Demonstrates 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 Wrapper31 Aug 2017Compatibility wrapper for using the new XPLMInstance APIs in plugins that support old versions of X-Plane.
X-Plane 11 Instanced Drawing Sample31 Aug 2017This sample shows off the new instancing API, used for efficiently drawing objects without needing to write OpenGL.
X-Plane Menu SDK Sample28 Jun 2017A basic demonstration for adding submenus to the in-sim Plugin menu.
X-Plane 11 Window Gravity Sample28 Jun 2017Creates a window that is dynamically resized based on the X-Plane window's size.
X-Plane 11 Window API Sample28 Jun 2017Creates 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 Sample27 Jun 2017Draws custom map layers using pure OpenGL, PNG icons, and text labels.
TextureDraw5 Dec 2014This code snippet shows how to load a texture and draw it as a 2D quad.
TextFieldFilters5 Dec 2014This code snippet shows how to attache control V, C, and X as cut/copy/paste.
Fast Culling5 Dec 2014This code snippet can be used to determine if a sphere at a location in the current OpenGL coordinates is visible.
ClickingIn3D5 Dec 2014This code snippet saves the 2d mouse click and outputs it as two 3-d points.
Billboards5 Dec 2014This is a code snippet that returns up to 3 camera directions in OpenGL coordinates.
ArrayDataRef4 Dec 2014This is a code snippet that shows how to write custom array dataref handlers.
Register Custom DataRef in Dataref Editor4 Dec 2014This 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 Object4 Dec 2014This sample code shows how to draw a terrain object that moves in relation to the aircraft
Custom Manipulator Controlling X-Plane15 Nov 2014This sample illustrates control of X-Plane DataRefs using custom manipulators.
Custom Command with Custom DataRef7 Nov 2014This example program creates a custom integer dataref and 2 custom commands.
Custom Command7 Nov 2014This example program illustrates creating a custom command.
Create Instructions Widget7 Nov 2014This example shows how to use a pulldown menu to create a widget window to display a list of instructions or notes.
AcquirePlaneTest7 Nov 2014A quick test of airplane acquisition.
OpenAL Shared Example28 Dec 2012This sample code demonstrates how to use OpenAL with a context from a plugin.
TimedProcessing4 Dec 2012This example plugin demonstrates how to use the timed processing callbacks to continuously record sim data to disk.
SimData4 Dec 2012This example creates menus items that change the nav-1 radio frequency to demonstrate how to interact with X-Plane by reading and writing data.
ShareData4 Dec 2012This is an example plugin that demonstrates how to share data, both owned by a plugin and shared.
Position4 Dec 2012This sample is a plug-in that allows positioning of lat/lon etc.
Override4 Dec 2012This 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 Example4 Dec 2012This sample plugin plays a sound whenever an airplane is loaded. It demonstrates how to use OpenAL with a context from a plugin.
ManagePlugins4 Dec 2012This sample demonstrates how to manage other plugins.
KeySniffer4 Dec 2012This example shows the use of key sniffers to intercept and process raw keystrokes.
EngineStarter4 Dec 2012This examples shows how to start the engines via plugin.
DrawAircraft4 Dec 2012This examples shows how to draw 7 AI aircraft around the user aircraft.
Custom Prop Disc15 Nov 2012This sample shows how to create a plugin to drive a custom prop disc.
Control7 Nov 2012This sample shows how to control lat/long, etc.
CommandSim7 Nov 2012This sample demonstrates how to send commands to the sim. Commands allow you to simulate any keystroke or joystick button press or release.
Camera7 Nov 2012This sample shows how to register a new view with the sim that orbits the aircraft.
Beacons and Strobes7 Nov 2012This sample shows how to override X-Plane's default flash patterns for the beacons and strobes.
SDK210Tests25 Jan 2012This sample tests SDK 2.10 functions.
MotionPlatformData4 Dec 2007Plugin to show how to derive motion platform data from datarefs.
SDK200Tests20 Nov 2007This sample tests SDK 2.00 functions.
FMSUtility4 Dec 2005This examples shows how to access the FMS via plugin.
ReloadPlugins4 Dec 2004This example shows how reload plugins so you don't have to quit X-Plane.
TestWidgets21 Feb 2003This example shows how to create 2 custom widgets which are then used by the plugin.