Cargo Features

[dependencies]
egui-sdl2 = { version = "0.2.5", default-features = false, features = ["glow-backend", "canvas-backend", "wgpu-backend", "links", "sdl2-gfx", "sdl2-image", "sdl2-mixer", "sdl2-ttf", "sdl2-raw-window-handle", "sdl2-unsafe_textures", "sdl2-use-bindgen", "sdl2-use-vcpkg", "sdl2-use-pkgconfig", "sdl2-static-link", "sdl2-use_mac_framework", "sdl2-use_ios_framework", "sdl2-bundled"] }
default = canvas-backend, glow-backend, links, wgpu-backend

These default features are set whenever egui-sdl2 is added without default-features = false somewhere in the dependency tree.

glow-backend default = egui_glow, glow

Enable rendering via glow

Affects egui-sdl2::glow

canvas-backend default = bytemuck, sdl2-sys

Enable rendering via canvas

Enables bytemuck of egui, unsafe_textures of sdl2

Affects egui-sdl2::canvas

wgpu-backend default = egui-wgpu, web-time

Enable rendering via canvas

Enables raw-window-handle of sdl2

Affects egui-sdl2::wgpu

Enable opening links in a browser when an egui hyperlink is clicked.

sdl2-gfx

Forward sdl2 features

Enables gfx of sdl2

sdl2-image

Enables image of sdl2

sdl2-mixer

Enables mixer of sdl2

sdl2-ttf

Enables ttf of sdl2

sdl2-raw-window-handle

Enables raw-window-handle of sdl2

sdl2-unsafe_textures

Enables unsafe_textures of sdl2

sdl2-use-bindgen

Enables use-bindgen of sdl2

sdl2-use-vcpkg

Enables use-vcpkg of sdl2

sdl2-use-pkgconfig

Enables use-pkgconfig of sdl2

Enables static-link of sdl2

sdl2-use_mac_framework

Enables use_mac_framework of sdl2

sdl2-use_ios_framework

Enables use_ios_framework of sdl2

sdl2-bundled

Enables bundled of sdl2

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

webbrowser links
glow glow-backend

Enables glow

glow-backend:

egui_glow glow-backend
sdl2-sys canvas-backend

Enables sdl2-sys

canvas-backend:

bytemuck canvas-backend
egui-wgpu wgpu-backend

Enables egui-wgpu

wgpu-backend:

web-time wgpu-backend