mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-23 19:45:48 +00:00
ce1d5be212
* Move GPU LLE emulation from HLE to Graphics * Graphics: Move Gal/Texture to Texture * Remove Engines/ directory and namespace * Use tables for image formats * Abstract OpCode decoding * Simplify image table * Do not leak Read* symbols in TextureReader * Fixups * Rename IGalFrameBuffer -> IGalRenderTarget * Remove MaxBpp hardcoded value * Change yet again texture data and add G8R8 flipping * Rename GalFrameBufferFormat to GalSurfaceFormat * Unident EnsureSetup in ImageHandler * Add IsCompressed * Address some feedback
54 lines
No EOL
1.4 KiB
C#
54 lines
No EOL
1.4 KiB
C#
using System;
|
|
using System.Collections.Concurrent;
|
|
|
|
namespace Ryujinx.Graphics.Gal.OpenGL
|
|
{
|
|
public class OGLRenderer : IGalRenderer
|
|
{
|
|
public IGalConstBuffer Buffer { get; private set; }
|
|
|
|
public IGalRenderTarget RenderTarget { get; private set; }
|
|
|
|
public IGalRasterizer Rasterizer { get; private set; }
|
|
|
|
public IGalShader Shader { get; private set; }
|
|
|
|
public IGalPipeline Pipeline { get; private set; }
|
|
|
|
public IGalTexture Texture { get; private set; }
|
|
|
|
private ConcurrentQueue<Action> ActionsQueue;
|
|
|
|
public OGLRenderer()
|
|
{
|
|
Buffer = new OGLConstBuffer();
|
|
|
|
Texture = new OGLTexture();
|
|
|
|
RenderTarget = new OGLRenderTarget(Texture as OGLTexture);
|
|
|
|
Rasterizer = new OGLRasterizer();
|
|
|
|
Shader = new OGLShader(Buffer as OGLConstBuffer);
|
|
|
|
Pipeline = new OGLPipeline(Buffer as OGLConstBuffer, Rasterizer as OGLRasterizer, Shader as OGLShader);
|
|
|
|
ActionsQueue = new ConcurrentQueue<Action>();
|
|
}
|
|
|
|
public void QueueAction(Action ActionMthd)
|
|
{
|
|
ActionsQueue.Enqueue(ActionMthd);
|
|
}
|
|
|
|
public void RunActions()
|
|
{
|
|
int Count = ActionsQueue.Count;
|
|
|
|
while (Count-- > 0 && ActionsQueue.TryDequeue(out Action RenderAction))
|
|
{
|
|
RenderAction();
|
|
}
|
|
}
|
|
}
|
|
} |