//CFTTGraphicsDeviceOGLES - [2020-04-13 11:57:46]
#ifndef _CFTTGRAPHICSDEVICEOGLES_H_
#define _CFTTGRAPHICSDEVICEOGLES_H_

#include "CFTTGraphicsBufferOGLES.h"
#include "CFTTGraphicsDevice.h"
#include "CFTTTextureOGLES.h"
#include "CFTTRenderBuffer.h"
#include "CFTTRenderToTexture.h"

/*
0020289C CFTTGraphicsDeviceOGLES::CFTTGraphicsDeviceOGLES()
002028E8 CFTTGraphicsDeviceOGLES::~CFTTGraphicsDeviceOGLES()
00202904 CFTTGraphicsDeviceOGLES::~CFTTGraphicsDeviceOGLES()
00202924 CFTTGraphicsDeviceOGLES::create()
00202932 CFTTGraphicsDeviceOGLES::destroy()
00202934 CFTTGraphicsDeviceOGLES::createVolatileResources()
00202936 CFTTGraphicsDeviceOGLES::deleteVolatileResources()
00202938 CFTTGraphicsDeviceOGLES::GetGPUName(wchar_t *,int)
00202954 CFTTGraphicsDeviceOGLES::beginScene(CFTTClearSettings const&,CFTTRenderTarget *,bool)
00202C58 CFTTGraphicsDeviceOGLES::endScene()
00202CB4 CFTTGraphicsDeviceOGLES::width()
00202CC4 CFTTGraphicsDeviceOGLES::height()
00202CD4 CFTTGraphicsDeviceOGLES::getDepthBufferBitDepth()
00202CE4 CFTTGraphicsDeviceOGLES::setWindowHandle(void *)
00202CE6 CFTTGraphicsDeviceOGLES::resetDisplay(int,int,int,int)
00202CEA CFTTGraphicsDeviceOGLES::setWireFrame(bool)
00202CF0 CFTTGraphicsDeviceOGLES::setDither(bool)
00202D2C CFTTGraphicsDeviceOGLES::setDepthTest(EFTTDepthTest,bool)
00202DC0 CFTTGraphicsDeviceOGLES::enableStencilTest(bool)
00202DFC CFTTGraphicsDeviceOGLES::setStencilFunc(EFTTStencilFunc,uint,uint)
00202E84 CFTTGraphicsDeviceOGLES::setStencilOp(EFTTStencilOp,EFTTStencilOp,EFTTStencilOp)
00202F38 CFTTGraphicsDeviceOGLES::setStencilMask(uint)
00202F54 CFTTGraphicsDeviceOGLES::enableScissorTest(int,int,int,int)
00203038 CFTTGraphicsDeviceOGLES::disableScissorTest()
0020305C CFTTGraphicsDeviceOGLES::createTexture()
00203070 CFTTGraphicsDeviceOGLES::createTexture(int,int,int,EFTTTexFormat,EFTTTextureType)
00203090 CFTTGraphicsDeviceOGLES::createRenderToTexture(EFTTTexFormat,int,int,uint,int,EFTTRTTZBufMode,bool,EFTTTextureType,uchar)
002030D4 CFTTGraphicsDeviceOGLES::createRenderToTexture(CFTTRTTSetup)
00203114 CFTTGraphicsDeviceOGLES::getTextureFormatSupport(EFTTTexFormat,bool,bool)
00203154 CFTTGraphicsDeviceOGLES::createShaderProgram(CFTTUberShader const*,uchar const*,bool)
00203174 CFTTGraphicsDeviceOGLES::createGraphicsBuffer(EFTTGraphicsBufferType,EFTTGraphicsBufferVolatility,uint)
00203194 CFTTGraphicsDeviceOGLES::setIndexBuffer(CFTTGraphicsBuffer *)
002031C4 CFTTGraphicsDeviceOGLES::setVertexBuffer(CFTTGraphicsBuffer *,uint,uint,uint)
00203518 CFTTGraphicsDeviceOGLES::drawIndexed(FTTPRIMTYPE,int,int,int,int)
0020355C CFTTGraphicsDeviceOGLES::drawNonIndexed(FTTPRIMTYPE,int)
00203594 CFTTGraphicsDeviceOGLES::AssessHardware()
00203852 CFTTGraphicsDeviceOGLES::TrustGlGenerateMipmap()
00203868 CFTTGraphicsDeviceOGLES::GetRendererFamily()
0020386C CFTTGraphicsDeviceOGLES::GetRendererType()
00203870 CFTTGraphicsDeviceOGLES::Matrices_FlipsRTT()
00203874 CFTTGraphicsDeviceOGLES::Matrices_FlipsY()
00203878 CFTTGraphicsDeviceOGLES::Matrices_NDCIsCube()
0020387C CFTTGraphicsDeviceOGLES::DepthTextureSupported()
00203898 CFTTGraphicsDeviceOGLES::ARGBToPlatformU32(uint,uint,uint,uint)
002038A8 CFTTGraphicsDeviceOGLES::ARGBToPlatformU32(uint)
002038BA CFTTGraphicsDeviceOGLES::ExtractAFromPlatformU32(uint)
002038BE CFTTGraphicsDeviceOGLES::ExtractRFromPlatformU32(uint)
002038C2 CFTTGraphicsDeviceOGLES::ExtractGFromPlatformU32(uint)
002038C8 CFTTGraphicsDeviceOGLES::ExtractBFromPlatformU32(uint)
002038CE CFTTGraphicsDeviceOGLES::ARGBToPlatform4444(uint,uint,uint,uint)
002038EC CFTTGraphicsDeviceOGLES::ARGBToPlatform4444(uint)
0020390A CFTTGraphicsDeviceOGLES::ExtractAFromPlatform4444(ushort)
00203910 CFTTGraphicsDeviceOGLES::ExtractRFromPlatform4444(ushort)
00203914 CFTTGraphicsDeviceOGLES::ExtractGFromPlatform4444(ushort)
0020391A CFTTGraphicsDeviceOGLES::ExtractBFromPlatform4444(ushort)
00203920 CFTTGraphicsDeviceOGLES::SupportsThreadedTextureLoading()

--------------------------------------------------------------------------------------------------

.globl _ZTV23CFTTGraphicsDeviceOGLES
@ `vtable for'CFTTGraphicsDeviceOGLES
_ZTV23CFTTGraphicsDeviceOGLES:
  .long 0   @ DATA XREF: LOAD:000201C0↑o
            @ CFTTGraphicsDeviceOGLES::CFTTGraphicsDeviceOGLES()+16↑o ...
  .long 0
vptr_CFTTGraphicsDeviceOGLES_327E34:
  CFTTGraphicsDeviceOGLES::~CFTTGraphicsDeviceOGLES()
  CFTTGraphicsDeviceOGLES::~CFTTGraphicsDeviceOGLES()
  CFTTGraphicsDeviceOGLES::create()
  CFTTGraphicsDeviceOGLES::destroy()
  CFTTGraphicsDeviceOGLES::createVolatileResources()
  CFTTGraphicsDeviceOGLES::deleteVolatileResources()
  CFTTGraphicsDeviceOGLES::GetRendererFamily()
  CFTTGraphicsDeviceOGLES::GetRendererType()
  CFTTGraphicsDeviceOGLES::Matrices_FlipsRTT()
  CFTTGraphicsDeviceOGLES::Matrices_FlipsY()
  CFTTGraphicsDeviceOGLES::Matrices_NDCIsCube()
  CFTTGraphicsDeviceOGLES::DepthTextureSupported()
  CFTTGraphicsDeviceOGLES::GetGPUName(wchar_t *,int)
  CFTTGraphicsDevice::FloatTextureSupported()
  CFTTGraphicsDevice::TextureLODSupported()
  CFTTGraphicsDevice::MultisampleSupported()
  CFTTGraphicsDevice::DepthMultisampleSupported()
  CFTTGraphicsDevice::StencilMultisampleSupported()
  CFTTGraphicsDeviceOGLES::ARGBToPlatformU32(uint,uint,uint,uint)
  CFTTGraphicsDeviceOGLES::ARGBToPlatformU32(uint)
  CFTTGraphicsDeviceOGLES::ExtractAFromPlatformU32(uint)
  CFTTGraphicsDeviceOGLES::ExtractRFromPlatformU32(uint)
  CFTTGraphicsDeviceOGLES::ExtractGFromPlatformU32(uint)
  CFTTGraphicsDeviceOGLES::ExtractBFromPlatformU32(uint)
  CFTTGraphicsDeviceOGLES::ARGBToPlatform4444(uint,uint,uint,uint)
  CFTTGraphicsDeviceOGLES::ARGBToPlatform4444(uint)
  CFTTGraphicsDeviceOGLES::ExtractAFromPlatform4444(ushort)
  CFTTGraphicsDeviceOGLES::ExtractRFromPlatform4444(ushort)
  CFTTGraphicsDeviceOGLES::ExtractGFromPlatform4444(ushort)
  CFTTGraphicsDeviceOGLES::ExtractBFromPlatform4444(ushort)
  CFTTGraphicsDeviceOGLES::beginScene(CFTTClearSettings const&,CFTTRenderTarget *,bool)
  CFTTGraphicsDeviceOGLES::endScene()
  CFTTGraphicsDeviceOGLES::width()
  CFTTGraphicsDeviceOGLES::height()
  CFTTGraphicsDeviceOGLES::getDepthBufferBitDepth()
  CFTTGraphicsDeviceOGLES::setWindowHandle(void *)
  CFTTGraphicsDeviceOGLES::resetDisplay(int,int,int,int)
  CFTTGraphicsDeviceOGLES::SupportsThreadedTextureLoading()
  CFTTGraphicsDevice::CreateThreadedTextureLoadingContext()
  CFTTGraphicsDevice::ReleaseThreadedTextureLoadingContext()
  CFTTGraphicsDevice::savePipelineCache()
  CFTTGraphicsDeviceOGLES::setWireFrame(bool)
  CFTTGraphicsDeviceOGLES::setDither(bool)
  CFTTGraphicsDeviceOGLES::setDepthTest(EFTTDepthTest,bool)
  CFTTGraphicsDeviceOGLES::enableStencilTest(bool)
  CFTTGraphicsDeviceOGLES::setStencilFunc(EFTTStencilFunc,uint,uint)
  CFTTGraphicsDeviceOGLES::setStencilOp(EFTTStencilOp,EFTTStencilOp,EFTTStencilOp)
  CFTTGraphicsDeviceOGLES::setStencilMask(uint)
  CFTTGraphicsDeviceOGLES::enableScissorTest(int,int,int,int)
  CFTTGraphicsDeviceOGLES::disableScissorTest()
  CFTTGraphicsDeviceOGLES::createTexture()
  CFTTGraphicsDeviceOGLES::createTexture(int,int,int,EFTTTexFormat,EFTTTextureType)
  CFTTGraphicsDeviceOGLES::createRenderToTexture(EFTTTexFormat,int,int,uint,int,EFTTRTTZBufMode,bool,EFTTTextureType,uchar)
  CFTTGraphicsDeviceOGLES::createRenderToTexture(CFTTRTTSetup)
  CFTTGraphicsDeviceOGLES::getTextureFormatSupport(EFTTTexFormat,bool,bool)
  CFTTGraphicsDeviceOGLES::createShaderProgram(CFTTUberShader const*,uchar const*,bool)
  CFTTGraphicsDeviceOGLES::createGraphicsBuffer(EFTTGraphicsBufferType,EFTTGraphicsBufferVolatility,uint)
  CFTTGraphicsDeviceOGLES::setIndexBuffer(CFTTGraphicsBuffer *)
  CFTTGraphicsDeviceOGLES::setVertexBuffer(CFTTGraphicsBuffer *,uint,uint,uint)
  CFTTGraphicsDeviceOGLES::drawIndexed(FTTPRIMTYPE,int,int,int,int)
  CFTTGraphicsDeviceOGLES::drawNonIndexed(FTTPRIMTYPE,int)
  CFTTGraphicsDeviceOGLES::AssessHardware()

0x40
*/

extern int g_iMainFBOWidth;
extern int g_iMainFBOHeight;

class CFTTGraphicsDeviceOGLES : public CFTTGraphicsDevice {
public:
  CFTTGraphicsDeviceOGLES();                                                     //0020289C
  virtual ~CFTTGraphicsDeviceOGLES();                                            //002028E8 00202904
  virtual uint ARGBToPlatform4444(uint a2) const;                                //002038EC
  virtual ushort ARGBToPlatform4444(uint, uint, uint, uint) const;               //002038CE
  virtual uint ARGBToPlatformU32(uint) const;                                    //002038A8
  virtual uint ARGBToPlatformU32(uint, uint, uint, uint) const;                  //00203898
  virtual void AssessHardware();                                                 //00203594
  virtual bool DepthTextureSupported() const;                                    //0020387C
  virtual uint ExtractAFromPlatform4444(ushort) const;                           //0020390A
  virtual uint ExtractAFromPlatformU32(uint) const;                              //002038BA
  virtual uint ExtractBFromPlatform4444(ushort) const;                           //0020391A
  virtual uint ExtractBFromPlatformU32(uint) const;                              //002038C8
  virtual uint ExtractGFromPlatform4444(ushort) const;                           //00203914
  virtual uint ExtractGFromPlatformU32(uint) const;                              //002038C2
  virtual uint ExtractRFromPlatform4444(ushort) const;                           //00203910
  virtual uint ExtractRFromPlatformU32(uint8) const;                             //002038BE
  virtual void GetGPUName(wchar_t *, int) const;                                 //00202938
  virtual int GetRendererFamily() const;                                         //00203868
  virtual int GetRendererType() const;                                           //0020386C
  virtual int Matrices_FlipsRTT() const;                                         //00203870
  virtual int Matrices_FlipsY() const;                                           //00203874
  virtual int Matrices_NDCIsCube() const;                                        //00203878
  virtual int SupportsThreadedTextureLoading();                                  //00203920
  virtual bool beginScene(CFTTClearSettings const &, CFTTRenderTarget *, bool);  //00202954
  virtual int create();                                                          //00202924
  virtual CFTTGraphicsBuffer *createGraphicsBuffer(EFTTGraphicsBufferType,
                                                   EFTTGraphicsBufferVolatility,
                                                   uint);            //00203174
  virtual CFTTRenderToTexture *createRenderToTexture(CFTTRTTSetup);  //002030D4
  virtual CFTTRenderToTexture *createRenderToTexture(EFTTTexFormat,
                                                     int,
                                                     int,
                                                     uint,
                                                     int,
                                                     EFTTRTTZBufMode,
                                                     bool,
                                                     EFTTTextureType,
                                                     uchar);  //00203090

  virtual CFTTShaderProgram *createShaderProgram(CFTTUberShader const *pUberShader,
                                                 uchar const *pName,
                                                 bool flag);  //00203154

  virtual CFTTTexture *createTexture(int, int, int,
                                     EFTTTexFormat,
                                     EFTTTextureType);  //00203070

  virtual CFTTTexture *createTexture();                                                    //0020305C
  virtual void createVolatileResources();                                                  //00202934
  virtual void deleteVolatileResources();                                                  //00202936
  virtual void destroy();                                                                  //00202932
  virtual void disableScissorTest();                                                       //00203038
  virtual void drawIndexed(FTTPRIMTYPE, int, int, int, int);                               //00203518
  virtual void drawNonIndexed(FTTPRIMTYPE, int);                                           //0020355C
  virtual void enableScissorTest(int, int, int, int);                                      //00202F54
  virtual void enableStencilTest(bool);                                                    //00202DC0
  virtual void endScene();                                                                 //00202C58
  virtual int getDepthBufferBitDepth() const;                                              //00202CD4
  virtual int getTextureFormatSupport(EFTTTexFormat, bool, bool);                          //00203114
  virtual int height() const;                                                              //00202CC4
  virtual int resetDisplay(int, int, int, int);                                            //00202CE6
  virtual void setDepthTest(EFTTDepthTest, bool);                                          //00202D2C
  virtual void setDither(bool);                                                            //00202CF0
  virtual void setIndexBuffer(CFTTGraphicsBuffer *);                                       //00203194
  virtual void setStencilFunc(EFTTStencilFunc, GLuint, GLuint);                            //00202DFC
  virtual void setStencilMask(uint);                                                       //00202F38
  virtual void setStencilOp(EFTTStencilOp, EFTTStencilOp, EFTTStencilOp);                  //00202E84
  virtual void setVertexBuffer(CFTTGraphicsBuffer *pGraphBuf, uint a3, uint a4, uint a5);  //002031C4
  virtual void setWindowHandle(void *);                                                    //00202CE4
  virtual void setWireFrame(bool);                                                         //00202CEA
  virtual int width() const;                                                               //00202CB4
  bool TrustGlGenerateMipmap() const;                                                      //00203852
};

#endif  //_CFTTGRAPHICSDEVICEOGLES_H_