#include "CFTTGLES2Wrapper.h"

bool CFTTGLES2Wrapper::s_bDepthMask = true;                  //00348A50
uint32_t CFTTGLES2Wrapper::s_uDepthFunc = 0x201;             //00348A54
int CFTTGLES2Wrapper::s_eBlendEquationRGB = 0x8006;          //00348A58
int CFTTGLES2Wrapper::s_eBlendEquationAlpha = 0x8006;        //00348A5C
int CFTTGLES2Wrapper::s_eBlendSFactorRGB = 1;                //00348A60
int CFTTGLES2Wrapper::s_eBlendSFactorAlpha = 1;              //00348A64
GLenum CFTTGLES2Wrapper::s_eFrontFace = 0x901;               //00348A68
int CFTTGLES2Wrapper::s_eStencilFunc = 0x207;                //00348A6C
GLuint CFTTGLES2Wrapper::s_uStencilFuncMask = 0xFFFFFFFF;    //00348A70
GLuint CFTTGLES2Wrapper::s_uStencilWriteMask = 0xFFFFFFFF;   //00348A74
int CFTTGLES2Wrapper::s_eStencilOpFail = 0x1E00;             //00348A78
int CFTTGLES2Wrapper::s_eStencilOpZFail = 0x1E00;            //00348A7C
int CFTTGLES2Wrapper::s_eStencilOpZPass = 0x1E00;            //00348A80
int CFTTGLES2Wrapper::s_iScissorRect[4] = {-1, -1, -1, -1};  //00348A84
int CFTTGLES2Wrapper::s_iPixelStorePack = 4;                 //00348A94
int CFTTGLES2Wrapper::s_iPixelStoreUnpack = 4;               //00348A98

volatile uint32_t CFTTGLES2Wrapper::s_uActiveTextureIndex;     //005AA6C8
str_line_BoundTextures CFTTGLES2Wrapper::s_uBoundTextures[2];  //005AA6C8
uint32_t CFTTGLES2Wrapper::s_eBlendDFactorRGB;                 //005AA70C
uint32_t CFTTGLES2Wrapper::s_eBlendDFactorAlpha;               //005AA710
GLuint CFTTGLES2Wrapper::s_uBoundArrayBuffer;                  //005AA714
GLuint CFTTGLES2Wrapper::s_uBoundElementBuffer;                //005AA718
float CFTTGLES2Wrapper::s_fClearColour[4];                     //005AA71C
int CFTTGLES2Wrapper::s_iClearStencil;                         //005AA72C
uint32_t CFTTGLES2Wrapper::s_uProgram;                         //005AA730
int CFTTGLES2Wrapper::s_iStencilFuncRef;                       //005AA734
bool CFTTGLES2Wrapper::s_bVertexAttribEnabled[8];              //005AA738
uchar CFTTGLES2Wrapper::s_cEnabledState[206];                  //005AA5F8

//-------------------------------------------------------------------------------------------------
//0020BA54 //^_^
bool CFTTGLES2Wrapper::CheckUpdateBindBuffer(GLenum target, GLuint a2) {
  return true;
}
//-------------------------------------------------------------------------------------------------
//00204304 //^_^ 经过单元测试，功能正常
bool CFTTGLES2Wrapper::CheckUpdateBlendFunc(uint eSRGB,
                                            uint eDRGB,
                                            uint eSAlpha,
                                            uint eDAlpha) {
  return true;
}
//-------------------------------------------------------------------------------------------------
//00202BEC //^_^
bool CFTTGLES2Wrapper::CheckUpdateClearColour(float fred, float fgreen, float fblue, float falpha) {
  return true;
}
//-------------------------------------------------------------------------------------------------
//00202FFC //^_^
bool CFTTGLES2Wrapper::CheckUpdateScissor(GLint x, GLint y, GLint width, GLint height) {
  return true;
}
//-------------------------------------------------------------------------------------------------
//00202E38 //^_^
bool CFTTGLES2Wrapper::CheckUpdateStencilFunc(uint u0, int u1, uint u2) {
  return true;
}
//-------------------------------------------------------------------------------------------------
//00202EEC //^_^
bool CFTTGLES2Wrapper::CheckUpdateStencilOp(GLenum eOpFail, GLenum eOpZFail, GLenum eOpZPass) {
  return true;
}
//-------------------------------------------------------------------------------------------------
//0020BAC4 //^_^
void CFTTGLES2Wrapper::OnDeleteBuffers(int len, const GLuint* pBuf) {
}
//-------------------------------------------------------------------------------------------------
//002247A8 //^_^
void CFTTGLES2Wrapper::OnDeleteTextures(int len, const GLuint* pBuf) {
}
//-------------------------------------------------------------------------------------------------