You can still attach it to a viewport and just not let it draw out its contents, but manually rendering it like you are attempting to do is likely better in the end.
Also no, I had missed that you were doing that in the constructor since everything was in one line. Your issue would have to be outside of that class, I don’t see anything wrong with it.