mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-27 19:12:01 +00:00
e7559f128f
* Call OpenGL functions directly, remove the pfifo thread, some refactoring * Fix PerformanceStatistics calculating the wrong host fps, remove wait event on PFIFO as this wasn't exactly was causing the freezes (may replace with an exception later) * Organized the Gpu folder a bit more, renamed a few things, address PR feedback * Make PerformanceStatistics thread safe * Remove unused constant * Use unlimited update rate for better pref
49 lines
No EOL
1.5 KiB
C#
49 lines
No EOL
1.5 KiB
C#
using OpenTK.Graphics.OpenGL;
|
|
|
|
namespace Ryujinx.Graphics.Gal.OpenGL
|
|
{
|
|
public class OGLBlend : IGalBlend
|
|
{
|
|
public void Enable()
|
|
{
|
|
GL.Enable(EnableCap.Blend);
|
|
}
|
|
|
|
public void Disable()
|
|
{
|
|
GL.Disable(EnableCap.Blend);
|
|
}
|
|
|
|
public void Set(
|
|
GalBlendEquation Equation,
|
|
GalBlendFactor FuncSrc,
|
|
GalBlendFactor FuncDst)
|
|
{
|
|
GL.BlendEquation(
|
|
OGLEnumConverter.GetBlendEquation(Equation));
|
|
|
|
GL.BlendFunc(
|
|
OGLEnumConverter.GetBlendFactor(FuncSrc),
|
|
OGLEnumConverter.GetBlendFactor(FuncDst));
|
|
}
|
|
|
|
public void SetSeparate(
|
|
GalBlendEquation EquationRgb,
|
|
GalBlendEquation EquationAlpha,
|
|
GalBlendFactor FuncSrcRgb,
|
|
GalBlendFactor FuncDstRgb,
|
|
GalBlendFactor FuncSrcAlpha,
|
|
GalBlendFactor FuncDstAlpha)
|
|
{
|
|
GL.BlendEquationSeparate(
|
|
OGLEnumConverter.GetBlendEquation(EquationRgb),
|
|
OGLEnumConverter.GetBlendEquation(EquationAlpha));
|
|
|
|
GL.BlendFuncSeparate(
|
|
(BlendingFactorSrc)OGLEnumConverter.GetBlendFactor(FuncSrcRgb),
|
|
(BlendingFactorDest)OGLEnumConverter.GetBlendFactor(FuncDstRgb),
|
|
(BlendingFactorSrc)OGLEnumConverter.GetBlendFactor(FuncSrcAlpha),
|
|
(BlendingFactorDest)OGLEnumConverter.GetBlendFactor(FuncDstAlpha));
|
|
}
|
|
}
|
|
} |