void RenderMyTest(FRHICommandList& RHICmdList, ERHIFeatureLevel::Type FeatureLevel, const FLinearColor& Color) { // Get the collection of Global Shaders auto ShaderMap = GetGlobalShaderMap(FeatureLevel); // Get the actual shader instances off the ShaderMap TShaderMapRef MyVS(ShaderMap); TShaderMapRef MyPS(ShaderMap); // Declare a bound shader state using those shaders and apply it to the command list static FGlobalBoundShaderState MyTestBoundShaderState; SetGlobalBoundShaderState(RHICmdList, FeatureLevel, MyTestBoundShaderState, GetVertexDeclarationFVector4(), *MyVS, *MyPS); // Call our function to set up parameters MyPS->SetColor(RHICmdList, Color); // Setup the GPU in prep for drawing a solid quad RHICmdList.SetRasterizerState(TStaticRasterizerState::GetRHI()); RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI()); RHICmdList.SetDepthStencilState(TStaticDepthStencilState::GetRHI(), 0); // Setup the vertices FVector4 Vertices[4]; Vertices[0].Set(-1.0f, 1.0f, 0, 1.0f); Vertices[1].Set(1.0f, 1.0f, 0, 1.0f); Vertices[2].Set(-1.0f, -1.0f, 0, 1.0f); Vertices[3].Set(1.0f, -1.0f, 0, 1.0f); // Draw the quad DrawPrimitiveUP(RHICmdList, PT_TriangleStrip, 2, Vertices, sizeof(Vertices[0])); }