Basic wgpu/winit app that has egui on top of it.
I had a lot of trouble getting this up myself so threw it in a repo.
egui-wgpu also contains a Painter that will do most of this for you, but if you want stronger control over the rendering (like I do) you could do what I have done here.