Panel Graphics Radar Texture

These routines draw stock simulator textures, such as weather radar displays, into your avionics panel. Unlike texture atlas images which are loaded from files you provide, texture sources are live textures rendered by the simulator each frame. If the aircraft does not have the requested hardware (e.g. no weather radar installed), the draw call is silently skipped.


XPLMTextureSource

enum

An XPLMTextureSource identifies a stock simulator texture that can be drawn with the texture source drawing functions.

Name Value Description
xplm_Texture_WeatherRadar1 0 The pilot-side weather radar display.
xplm_Texture_WeatherRadar2 1 The copilot-side weather radar display.

XPLMTextureSourceDrawIn

function

This function draws a texture source scaled to fill a rectangular region. The texture is stretched or compressed to exactly match the specified bounds.

XPLM_API void       XPLMTextureSourceDrawIn(
                         XPLMTextureSource    tex,
                         uint32_t             tint,
                         int                  left,
                         int                  top,
                         int                  right,
                         int                  bottom
                    );

XPLMTextureSourceDrawMesh

function

This function draws a texture source onto an arbitrary triangle-strip mesh. Each vertex specifies both a panel-space position and a normalized texture coordinate (0.0 to 1.0) within the source texture. This gives you full control over how the texture is mapped onto geometry.

XPLM_API void       XPLMTextureSourceDrawMesh(
                         XPLMTextureSource    tex,
                         uint32_t             tint,
                         const XPLMTextureVertex_t * mesh,
                         ArraySize            count
                    );