IRenderer.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using Ryujinx.Common.Configuration;
  2. using Ryujinx.Graphics.Shader;
  3. using System;
  4. namespace Ryujinx.Graphics.GAL
  5. {
  6. public interface IRenderer : IDisposable
  7. {
  8. event EventHandler<ScreenCaptureImageInfo> ScreenCaptured;
  9. bool PreferThreading { get; }
  10. IPipeline Pipeline { get; }
  11. IWindow Window { get; }
  12. void BackgroundContextAction(Action action, bool alwaysBackground = false);
  13. BufferHandle CreateBuffer(int size);
  14. IProgram CreateProgram(ShaderSource[] shaders, ShaderInfo info);
  15. ISampler CreateSampler(SamplerCreateInfo info);
  16. ITexture CreateTexture(TextureCreateInfo info, float scale);
  17. void CreateSync(ulong id);
  18. void DeleteBuffer(BufferHandle buffer);
  19. ReadOnlySpan<byte> GetBufferData(BufferHandle buffer, int offset, int size);
  20. Capabilities GetCapabilities();
  21. HardwareInfo GetHardwareInfo();
  22. IProgram LoadProgramBinary(byte[] programBinary, bool hasFragmentShader, ShaderInfo info);
  23. void SetBufferData(BufferHandle buffer, int offset, ReadOnlySpan<byte> data);
  24. void UpdateCounters();
  25. void PreFrame();
  26. ICounterEvent ReportCounter(CounterType type, EventHandler<ulong> resultHandler, bool hostReserved);
  27. void ResetCounter(CounterType type);
  28. void RunLoop(Action gpuLoop)
  29. {
  30. gpuLoop();
  31. }
  32. void WaitSync(ulong id);
  33. void Initialize(GraphicsDebugLevel logLevel);
  34. void Screenshot();
  35. }
  36. }