renderFilter method Null safety

  1. @override
void renderFilter(
  1. RenderState renderState,
  2. RenderTextureQuad renderTextureQuad,
  3. int pass
)
override

Implementation

@override
void renderFilter(
    RenderState renderState, RenderTextureQuad renderTextureQuad, int pass) {
  final renderContext = renderState.renderContext as RenderContextWebGL;
  final renderTexture = renderTextureQuad.renderTexture;

  final renderProgram = renderContext.getRenderProgram(
      r'$ColorMatrixFilterProgram', () => ColorMatrixFilterProgram());

  renderContext.activateRenderProgram(renderProgram);
  renderContext.activateRenderTexture(renderTexture);
  renderProgram.renderColorMatrixFilterQuad(
      renderState, renderTextureQuad, this);
}