XPLM_API int        XPLMRegisterDrawCallback(
                         XPLMDrawCallback_f   inCallback,    
                         XPLMDrawingPhase     inPhase,    
                         int                  inWantsBefore,    
                         void *               inRefcon);    

This routine registers a low level drawing callback. Pass in the phase you want to be called for and whether you want to be called before or after. This routine returns 1 if the registration was successful, or 0 if the phase does not exist in this version of X-Plane. You may register a callback multiple times for the same or different phases as long as the refcon is unique each time.

Note that this function will likely be removed during the X-Plane 11 run as part of the transition to Vulkan/Metal/etc. See the XPLMInstance API for future-proof drawing of 3-D objects.