What are the major types of renderers in UE4?

I have been working on the code where the game thread and the rendering thread interact with each other and I stumbled across a few newer types that I didn’t know anything about.

But before that, let me start with what I know: the UE4 does the rendering in this pattern: the game thread frame sets the objects rotations and locations; Followed by the rendering thread which is platform-agnostic; Then finally the RHI thread which contains hardware specific implementations.

One important class is FSlateApplication, in this class we have a Renderer member object which is a shared pointer to the type FSlateRenderer; This FSlateRenderer class is an abstract class, and is the base of four derived classes; FSlateD3DRenderer, FSlateNullRenderer, FSlateOpenGLRenderer, and FSlateRHIRenderer. I would like to know what each of these classes is used for!

Now the FSlateD3DRenderer, and the FSlateOpenGLRenderer are part of StandaloneRenderer module, I guess as oppose to using the default RHI renderer, but I am not sure. The FSlateD3DRenderer appears to be for the Windows platform. These two beg the question: why not the functionality is part of RHI renderer already?

The fourth renderer is the FSlateNullRenderer is in its own module, and I have no idea what and why it is.

Null renderer is probably a “Mock”/headless renderer which actually does nothing.

1 Like