XPLMAvionicsScreenCallback_f

typedef void (* XPLMAvionicsScreenCallback_f)(
                         void *               inRefcon);

This is the prototype for drawing callbacks for custom devices' screens. Refcon is a unique value that you specify when creating the device, allowing you to slip a pointer to your own data to the callback.

Upon entry the OpenGL context will be correctly set up for you and OpenGL will be in panel coordinates for 2d drawing. The OpenGL state (texturing, etc.) will be unknown. X-Plane does not clear your screen for you between calls - this means you can re-use portions to save drawing, but otherwise you must call glClear() to erase the screen’s contents.