2018-02-05 00:08:20 +01:00
|
|
|
using System;
|
2018-04-08 21:17:35 +02:00
|
|
|
using System.Collections.Generic;
|
2018-02-05 00:08:20 +01:00
|
|
|
|
2018-02-20 21:09:23 +01:00
|
|
|
namespace Ryujinx.Graphics.Gal
|
2018-02-05 00:08:20 +01:00
|
|
|
{
|
2018-02-23 22:48:27 +01:00
|
|
|
public unsafe interface IGalRenderer
|
2018-02-05 00:08:20 +01:00
|
|
|
{
|
|
|
|
void QueueAction(Action ActionMthd);
|
|
|
|
void RunActions();
|
|
|
|
|
2018-02-23 22:48:27 +01:00
|
|
|
void InitializeFrameBuffer();
|
2018-03-12 05:04:52 +01:00
|
|
|
void ResetFrameBuffer();
|
2018-02-05 00:08:20 +01:00
|
|
|
void Render();
|
2018-02-23 22:48:27 +01:00
|
|
|
void SetWindowSize(int Width, int Height);
|
2018-03-01 03:37:40 +01:00
|
|
|
void SetFrameBuffer(
|
|
|
|
byte* Fb,
|
|
|
|
int Width,
|
|
|
|
int Height,
|
|
|
|
float ScaleX,
|
|
|
|
float ScaleY,
|
|
|
|
float OffsX,
|
|
|
|
float OffsY,
|
|
|
|
float Rotate);
|
|
|
|
|
2018-04-08 21:17:35 +02:00
|
|
|
//Blend
|
|
|
|
void SetBlendEnable(bool Enable);
|
2018-03-01 03:37:40 +01:00
|
|
|
|
2018-04-08 21:17:35 +02:00
|
|
|
void SetBlend(
|
|
|
|
GalBlendEquation Equation,
|
|
|
|
GalBlendFactor FuncSrc,
|
|
|
|
GalBlendFactor FuncDst);
|
2018-03-01 03:37:40 +01:00
|
|
|
|
2018-04-08 21:17:35 +02:00
|
|
|
void SetBlendSeparate(
|
|
|
|
GalBlendEquation EquationRgb,
|
|
|
|
GalBlendEquation EquationAlpha,
|
|
|
|
GalBlendFactor FuncSrcRgb,
|
|
|
|
GalBlendFactor FuncDstRgb,
|
|
|
|
GalBlendFactor FuncSrcAlpha,
|
|
|
|
GalBlendFactor FuncDstAlpha);
|
|
|
|
|
|
|
|
//Frame Buffer
|
|
|
|
void SetFb(int FbIndex, int Width, int Height);
|
|
|
|
|
|
|
|
void BindFrameBuffer(int FbIndex);
|
|
|
|
|
|
|
|
void DrawFrameBuffer(int FbIndex);
|
|
|
|
|
|
|
|
//Rasterizer
|
|
|
|
void ClearBuffers(int RtIndex, GalClearBufferFlags Flags);
|
|
|
|
|
|
|
|
void SetVertexArray(int VbIndex, int Stride, byte[] Buffer, GalVertexAttrib[] Attribs);
|
|
|
|
|
|
|
|
void SetIndexArray(byte[] Buffer, GalIndexFormat Format);
|
|
|
|
|
|
|
|
void DrawArrays(int VbIndex, GalPrimitiveType PrimType);
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
void BindShader(long Tag);
|
|
|
|
|
|
|
|
void BindProgram();
|
|
|
|
|
|
|
|
//Texture
|
|
|
|
void SetTexture(int Index, GalTexture Tex);
|
|
|
|
|
|
|
|
void SetSampler(int Index, GalTextureSampler Sampler);
|
2018-02-05 00:08:20 +01:00
|
|
|
}
|
|
|
|
}
|