IRenderer.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. IPipeline Pipeline { get; }
  9. IWindow Window { get; }
  10. void BackgroundContextAction(Action action);
  11. IShader CompileShader(ShaderStage stage, string code);
  12. BufferHandle CreateBuffer(int size);
  13. IProgram CreateProgram(IShader[] shaders, TransformFeedbackDescriptor[] transformFeedbackDescriptors);
  14. ISampler CreateSampler(SamplerCreateInfo info);
  15. ITexture CreateTexture(TextureCreateInfo info, float scale);
  16. void DeleteBuffer(BufferHandle buffer);
  17. byte[] GetBufferData(BufferHandle buffer, int offset, int size);
  18. Capabilities GetCapabilities();
  19. IProgram LoadProgramBinary(byte[] programBinary);
  20. void SetBufferData(BufferHandle buffer, int offset, ReadOnlySpan<byte> data);
  21. void UpdateCounters();
  22. void PreFrame();
  23. ICounterEvent ReportCounter(CounterType type, EventHandler<ulong> resultHandler);
  24. void ResetCounter(CounterType type);
  25. void Initialize(GraphicsDebugLevel logLevel);
  26. }
  27. }