# SDL Draw Unit (/integration/embedded_linux/draw_units/draw_sdl)



Overview [#overview]

The SDL draw unit renders widgets in software, caches the result as an SDL texture, and lets SDL's own
renderer blend those textures into the final frame. It is a hybrid: software rasterization,
hardware compositing.

It is the natural choice when your application already uses SDL and you want cheap acceleration without
introducing an OpenGL dependency. It works best with static or slowly-changing UIs, where most textures are
reused between frames, and offers little for content that changes every frame.

For genuinely GPU-accelerated rendering, use [NanoVG](/integration/embedded_linux/draw_units/draw_nanovg)
through the SDL driver's EGL backend instead. It rasterizes on the GPU rather than only compositing there.

Configuration [#configuration]

Enable <ApiLink name="LV_USE_DRAW_SDL" /> and <ApiLink name="LV_USE_SDL" /> and select `LV_SDL_BACKEND_TEXTURE`
as your <ApiLink name="LV_SDL_BACKEND" />

Building [#building]

The renderer requires `sdl2_image`.

<Callout type="tip">
  LVGL's CMake integration resolves it for you.
  It can be fetched at compile time by LVGL so it doesn't have to be present on your system.

  See [Dependency Management](/integration/building/cmake).
</Callout>

See Also [#see-also]

* [SDL Driver](/integration/pc/sdl) - the display driver this draw unit pairs with
* [NanoVG Draw Unit](/integration/embedded_linux/draw_units/draw_nanovg) - true GPU rasterization, via SDL's EGL backend
* [OpenGL Overview](/integration/embedded_linux/opengl) - how drivers and draw units fit together
* [Dependency Management](/integration/building/cmake) - how LVGL resolves or fetches SDL2\_image
