public bool SetHWRender(ref retro_hw_render_callback hwRenderCallback) { if (_hwRenderer != null) { _hwRenderer.Destroy(); } _glRenderContext = new DxTextureRenderContext(_device); _hwRenderer = new GLHardwareRenderer(new DefaultRenderStrategy(), _glRenderContext); if (!_maxSize.IsEmpty) { _hwRenderer.SetDimensions(_maxSize.Width, _maxSize.Height); } return(_hwRenderer.SetHWRender(ref hwRenderCallback)); }
public void Destroy() { _hwRenderer?.Destroy(); }