IRenderer.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. IShader CompileShader(ShaderStage stage, string code);
  14. BufferHandle CreateBuffer(int size);
  15. IProgram CreateProgram(IShader[] shaders, ShaderInfo info);
  16. ISampler CreateSampler(SamplerCreateInfo info);
  17. ITexture CreateTexture(TextureCreateInfo info, float scale);
  18. void CreateSync(ulong id);
  19. void DeleteBuffer(BufferHandle buffer);
  20. ReadOnlySpan<byte> GetBufferData(BufferHandle buffer, int offset, int size);
  21. Capabilities GetCapabilities();
  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. }