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

49 lines
1.2 KiB
C
Raw Normal View History

#ifndef FRAMEBUFFER_H
#define FRAMEBUFFER_H
#include "Types.h"
#include "Textures.h"
struct gDPTile;
struct FrameBuffer
{
FrameBuffer *higher, *lower;
CachedTexture *texture;
2013-10-30 06:07:24 +00:00
const CachedTexture *depth_texture;
2013-06-01 13:10:30 +00:00
GLuint fbo;
u32 startAddress, endAddress;
u32 size, width, height, fillcolor;
bool cleared;
gDPTile *loadTile;
float scaleX, scaleY;
};
struct FrameBufferInfo
{
FrameBuffer *top, *bottom, *current;
int numBuffers;
2013-06-01 13:10:30 +00:00
GLenum drawBuffer;
};
extern FrameBufferInfo frameBuffer;
extern bool g_bCopyToRDRAM;
2013-09-07 16:31:04 +00:00
extern bool g_bCopyFromRDRAM;
extern bool g_bUseFloatDepthTexture;
2013-10-30 06:07:24 +00:00
struct DepthBuffer;
void FrameBuffer_Init();
void FrameBuffer_Destroy();
void FrameBuffer_SaveBuffer( u32 address, u16 format, u16 size, u16 width, u16 height );
void FrameBuffer_RenderBuffer( u32 address );
void FrameBuffer_RemoveBuffer( u32 address );
2013-10-30 06:07:24 +00:00
void FrameBuffer_AttachDepthBuffer();
void FrameBuffer_CopyToRDRAM( u32 address, bool bSync );
void FrameBuffer_CopyFromRDRAM( u32 address, bool bUseAlpha );
FrameBuffer *FrameBuffer_FindBuffer( u32 address );
void FrameBuffer_ActivateBufferTexture( s16 t, FrameBuffer *buffer );
void FrameBuffer_ActivateBufferTextureBG( s16 t, FrameBuffer *buffer );
#endif