1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Implement FrameBufferRead

This commit is contained in:
Sergey Lipskiy 2015-11-23 19:27:16 +06:00
parent 6bc16d0492
commit 955e344ac0
2 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#include "OpenGL.h"
#include "FrameBuffer.h"
#include "DepthBuffer.h"
#include "RSP.h"
#include "VI.h"
#include "Log.h"
@ -20,7 +21,17 @@ void FrameBufferWriteList(FrameBufferModifyEntry *plist, u32 size)
void FrameBufferRead(u32 addr)
{
// TODO: remove debug print
debugPrint("FBRead addr=%08lx \n", addr);
const u32 address = RSP_SegmentToPhysical(addr);
FrameBuffer * pBuffer = frameBufferList().findBuffer(address);
if (pBuffer == nullptr)
return;
if (pBuffer->m_isDepthBuffer)
FrameBuffer_CopyDepthBufferChunk(address);
else
FrameBuffer_CopyChunkToRDRAM(address);
}
void FrameBufferGetInfo(void *pinfo)

View File

@ -2,6 +2,7 @@
#define RSP_H
#include "Types.h"
#include "N64.h"
typedef struct
{