This is a simple test project which I used to develop a method to render on top of the RViz2 scene after the old approach from RViz did not work anymore. It is used in the hector_rviz_overlay (though in a fixed and more production ready version).
Feel free to use this experimental package for any purposes. I don't give any warranties or claim that it will work for you. I've tested it with an intel and an nvidia gpu.