1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-27 00:26:01 +00:00
Ryujinx/Ryujinx.Graphics/Gal/IGalRenderer.cs

90 lines
2.5 KiB
C#
Raw Normal View History

2018-02-04 23:08:20 +00:00
using System;
using System.Collections.Generic;
2018-02-04 23:08:20 +00:00
namespace Ryujinx.Graphics.Gal
2018-02-04 23:08:20 +00:00
{
public unsafe interface IGalRenderer
2018-02-04 23:08:20 +00:00
{
void QueueAction(Action ActionMthd);
2018-02-04 23:08:20 +00:00
void RunActions();
void Render();
void SetWindowSize(int Width, int Height);
//Blend
void SetBlendEnable(bool Enable);
void SetBlend(
GalBlendEquation Equation,
GalBlendFactor FuncSrc,
GalBlendFactor FuncDst);
void SetBlendSeparate(
GalBlendEquation EquationRgb,
GalBlendEquation EquationAlpha,
GalBlendFactor FuncSrcRgb,
GalBlendFactor FuncDstRgb,
GalBlendFactor FuncSrcAlpha,
GalBlendFactor FuncDstAlpha);
//Frame Buffer
void CreateFrameBuffer(long Tag, int Width, int Height);
void BindFrameBuffer(long Tag);
void BindFrameBufferTexture(long Tag, int Index, GalTextureSampler Sampler);
void SetFrameBuffer(long Tag);
void SetFrameBuffer(byte[] Data, int Width, int Height);
void SetFrameBufferTransform(float SX, float SY, float Rotate, float TX, float TY);
void SetViewport(int X, int Y, int Width, int Height);
void GetFrameBufferData(long Tag, Action<byte[]> Callback);
//Rasterizer
void ClearBuffers(int RtIndex, GalClearBufferFlags Flags);
bool IsVboCached(long Tag, long DataSize);
bool IsIboCached(long Tag, long DataSize);
void CreateVbo(long Tag, byte[] Buffer);
void CreateIbo(long Tag, byte[] Buffer);
void SetVertexArray(int VbIndex, int Stride, long VboTag, GalVertexAttrib[] Attribs);
void SetIndexArray(long Tag, int Size, GalIndexFormat Format);
void DrawArrays(int First, int PrimCount, GalPrimitiveType PrimType);
void DrawElements(long IboTag, int First, GalPrimitiveType PrimType);
//Shader
void CreateShader(IGalMemory Memory, long Tag, GalShaderType Type);
IEnumerable<ShaderDeclInfo> GetTextureUsage(long Tag);
void SetConstBuffer(long Tag, int Cbuf, byte[] Data);
void SetUniform1(string UniformName, int Value);
void SetUniform2F(string UniformName, float X, float Y);
void BindShader(long Tag);
void BindProgram();
//Texture
void SetTextureAndSampler(long Tag, byte[] Data, GalTexture Texture, GalTextureSampler Sampler);
bool TryGetCachedTexture(long Tag, long DataSize, out GalTexture Texture);
void BindTexture(long Tag, int Index);
2018-02-04 23:08:20 +00:00
}
}