public void blend(Context context, ITextureView destRgb, ITextureView destDepth, Blender blender) { // BTW, the ability to read from multi-sampled textures appeared in GLES 3.1, just in time: // https://www.khronos.org/registry/OpenGL-Refpages/es3.1/html/texelFetch.xhtml if (null == blenderBinding) { using (var resourceView = texture.GetDefaultView(TextureViewType.ShaderResource)) blenderBinding = blender.bindSource(resourceView); } var ic = context.context; ic.SetRenderTarget(destRgb, destDepth); blender.blend(ic, blenderBinding); }
void IDisposable.Dispose() { destroyTargets(); blender?.Dispose(); blender = null; }