IRenderer.cs 1.5 KB

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