2013-04-18 03:29:41 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2010-06-09 01:37:08 +00:00
|
|
|
|
|
|
|
#ifndef _EFB_INTERFACE_H_
|
|
|
|
#define _EFB_INTERFACE_H_
|
|
|
|
|
|
|
|
#include "VideoCommon.h"
|
|
|
|
|
|
|
|
namespace EfbInterface
|
|
|
|
{
|
2013-04-14 03:54:02 +00:00
|
|
|
const int DEPTH_BUFFER_START = EFB_WIDTH * EFB_HEIGHT * 3;
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2010-12-31 06:45:18 +00:00
|
|
|
enum { ALP_C, BLU_C, GRN_C, RED_C };
|
|
|
|
|
2013-04-14 03:54:02 +00:00
|
|
|
// color order is ABGR in order to emulate RGBA on little-endian hardware
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2013-04-14 03:54:02 +00:00
|
|
|
// does full blending of an incoming pixel
|
|
|
|
void BlendTev(u16 x, u16 y, u8 *color);
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2013-04-14 03:54:02 +00:00
|
|
|
// compare z at location x,y
|
|
|
|
// writes it if it passes
|
|
|
|
// returns result of compare.
|
|
|
|
bool ZCompare(u16 x, u16 y, u32 z);
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2013-04-14 03:54:02 +00:00
|
|
|
// sets the color and alpha
|
|
|
|
void SetColor(u16 x, u16 y, u8 *color);
|
|
|
|
void SetDepth(u16 x, u16 y, u32 depth);
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2013-04-14 03:54:02 +00:00
|
|
|
void GetColor(u16 x, u16 y, u8 *color);
|
|
|
|
u32 GetDepth(u16 x, u16 y);
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2013-04-14 03:54:02 +00:00
|
|
|
u8* GetPixelPointer(u16 x, u16 y, bool depth);
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2013-04-14 03:54:02 +00:00
|
|
|
void UpdateColorTexture();
|
|
|
|
extern u8 efbColorTexture[EFB_WIDTH*EFB_HEIGHT*4]; // RGBA format
|
2013-02-26 01:05:02 +00:00
|
|
|
void DoState(PointerWrap &p);
|
2010-06-09 01:37:08 +00:00
|
|
|
}
|
2013-04-14 03:54:02 +00:00
|
|
|
|
2010-06-09 01:37:08 +00:00
|
|
|
#endif
|