2018-02-04 18:08:20 -05:00
|
|
|
using System;
|
2018-04-08 15:17:35 -04:00
|
|
|
using System.Collections.Generic;
|
2018-02-04 18:08:20 -05:00
|
|
|
|
2018-02-20 15:09:23 -05:00
|
|
|
namespace Ryujinx.Graphics.Gal
|
2018-02-04 18:08:20 -05:00
|
|
|
{
|
2018-02-23 16:48:27 -05:00
|
|
|
public unsafe interface IGalRenderer
|
2018-02-04 18:08:20 -05:00
|
|
|
{
|
|
|
|
void QueueAction(Action ActionMthd);
|
2018-04-13 14:12:58 -04:00
|
|
|
|
2018-02-04 18:08:20 -05:00
|
|
|
void RunActions();
|
|
|
|
|
|
|
|
void Render();
|
2018-04-13 14:12:58 -04:00
|
|
|
|
2018-02-23 16:48:27 -05:00
|
|
|
void SetWindowSize(int Width, int Height);
|
2018-02-28 21:37:40 -05:00
|
|
|
|
2018-04-08 15:17:35 -04:00
|
|
|
//Blend
|
|
|
|
void SetBlendEnable(bool Enable);
|
2018-02-28 21:37:40 -05:00
|
|
|
|
2018-04-08 15:17:35 -04:00
|
|
|
void SetBlend(
|
|
|
|
GalBlendEquation Equation,
|
|
|
|
GalBlendFactor FuncSrc,
|
|
|
|
GalBlendFactor FuncDst);
|
2018-02-28 21:37:40 -05:00
|
|
|
|
2018-04-08 15:17:35 -04:00
|
|
|
void SetBlendSeparate(
|
|
|
|
GalBlendEquation EquationRgb,
|
|
|
|
GalBlendEquation EquationAlpha,
|
|
|
|
GalBlendFactor FuncSrcRgb,
|
|
|
|
GalBlendFactor FuncDstRgb,
|
|
|
|
GalBlendFactor FuncSrcAlpha,
|
|
|
|
GalBlendFactor FuncDstAlpha);
|
|
|
|
|
|
|
|
//Frame Buffer
|
2018-04-13 14:12:58 -04:00
|
|
|
void CreateFrameBuffer(long Tag, int Width, int Height);
|
|
|
|
|
|
|
|
void BindFrameBuffer(long Tag);
|
|
|
|
|
|
|
|
void BindFrameBufferTexture(long Tag, int Index, GalTextureSampler Sampler);
|
|
|
|
|
|
|
|
void SetFrameBuffer(long Tag);
|
2018-04-08 15:17:35 -04:00
|
|
|
|
2018-04-13 14:12:58 -04:00
|
|
|
void SetFrameBuffer(byte[] Data, int Width, int Height);
|
2018-04-08 15:17:35 -04:00
|
|
|
|
2018-04-13 14:12:58 -04:00
|
|
|
void SetFrameBufferTransform(float SX, float SY, float Rotate, float TX, float TY);
|
2018-04-08 15:17:35 -04:00
|
|
|
|
2018-04-13 23:39:24 -04:00
|
|
|
void SetViewport(int X, int Y, int Width, int Height);
|
|
|
|
|
2018-04-25 22:11:26 -04:00
|
|
|
void GetFrameBufferData(long Tag, Action<byte[]> Callback);
|
|
|
|
|
2018-04-08 15:17:35 -04:00
|
|
|
//Rasterizer
|
|
|
|
void ClearBuffers(int RtIndex, GalClearBufferFlags Flags);
|
|
|
|
|
|
|
|
void SetVertexArray(int VbIndex, int Stride, byte[] Buffer, GalVertexAttrib[] Attribs);
|
|
|
|
|
|
|
|
void SetIndexArray(byte[] Buffer, GalIndexFormat Format);
|
|
|
|
|
2018-04-25 22:11:26 -04:00
|
|
|
void DrawArrays(int VbIndex, int First, int PrimCount, GalPrimitiveType PrimType);
|
2018-04-08 15:17:35 -04:00
|
|
|
|
|
|
|
void DrawElements(int VbIndex, int First, GalPrimitiveType PrimType);
|
|
|
|
|
|
|
|
//Shader
|
|
|
|
void CreateShader(long Tag, GalShaderType Type, byte[] Data);
|
|
|
|
|
|
|
|
IEnumerable<ShaderDeclInfo> GetTextureUsage(long Tag);
|
|
|
|
|
|
|
|
void SetConstBuffer(long Tag, int Cbuf, byte[] Data);
|
|
|
|
|
|
|
|
void SetUniform1(string UniformName, int Value);
|
|
|
|
|
2018-04-13 23:39:24 -04:00
|
|
|
void SetUniform2F(string UniformName, float X, float Y);
|
|
|
|
|
2018-04-08 15:17:35 -04:00
|
|
|
void BindShader(long Tag);
|
|
|
|
|
|
|
|
void BindProgram();
|
|
|
|
|
|
|
|
//Texture
|
2018-04-13 14:12:58 -04:00
|
|
|
void SetTextureAndSampler(int Index, GalTexture Texture, GalTextureSampler Sampler);
|
2018-04-08 15:17:35 -04:00
|
|
|
|
2018-04-13 14:12:58 -04:00
|
|
|
void BindTexture(int Index);
|
2018-02-04 18:08:20 -05:00
|
|
|
}
|
|
|
|
}
|