IRenderer.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. 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. }