Some small sync primitive fixes, logging fixes, started to implement the 2D engine on the GPU, fixed DrawArrays, implemented a few more shader instructions, made a start on nvdrv refactor, etc...
This commit is contained in:
parent
211f7f69db
commit
a38a72b062
27 changed files with 816 additions and 199 deletions
|
@ -270,6 +270,31 @@ namespace Ryujinx.Graphics.Gal.OpenGL
|
|||
}
|
||||
}
|
||||
|
||||
public void GetBufferData(long Tag, Action<byte[]> Callback)
|
||||
{
|
||||
if (Fbs.TryGetValue(Tag, out FrameBuffer Fb))
|
||||
{
|
||||
GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, Fb.Handle);
|
||||
|
||||
byte[] Data = new byte[Fb.Width * Fb.Height * 4];
|
||||
|
||||
(PixelFormat Format, PixelType Type) = OGLEnumConverter.GetTextureFormat(GalTextureFormat.A8B8G8R8);
|
||||
|
||||
GL.ReadPixels(
|
||||
0,
|
||||
0,
|
||||
Fb.Width,
|
||||
Fb.Height,
|
||||
Format,
|
||||
Type,
|
||||
Data);
|
||||
|
||||
Callback(Data);
|
||||
|
||||
GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, CurrFbHandle);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetViewport(Rect Viewport)
|
||||
{
|
||||
GL.Viewport(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue