#ifndef _FTTGraphics_H_
#define _FTTGraphics_H_

#include "CFTTGraphicsBuffer.h"
#include "CFTTRenderTarget.h"
#include "CFTTGraphicsDevice.h"

/*
002005FC FTTGraphicsInitializeCommon()
002006DC FTTGraphicsCleanupCommon()
002007C4 FTTGraphics_CalculateVertexSize(int)
00200BAC FTTGraphicsInitialize_SetBufSizes(int,int)
00200BBC FTTGraphicsSetScreenRotation(EScreenRotation)
00200BC8 FTTGraphicsGetScreenRotation()
00200BE8 FTTGraphics_IndexCountToPrimCount(FTTPRIMTYPE,int)
00200C14 FTTGraphics_PrimCountToIndexCount(FTTPRIMTYPE,int)
00202674 FTTGraphicsEnableStencilBuffer(bool)
00202680 FTTGraphicsIsStencilBufferEnabled()
0020268C FTTGraphicsAndroid_SetScreen(int,int)
002026E8 FTTGraphicsAndroid_SetScreenSize(float)
002026F4 FTTGraphicsAndroid_InitializeVulkanEarly()
002026F8 FTTGraphicsAndroid_OnVulkanSurfaceAcquired(ANativeWindow *)
00202744 FTTGraphicsAndroid_OnVulkanSurfaceLost()
00202768 FTTGraphicsAndroid_GetScreenSize()
00202774 FTTGraphicsInitialize(int)
00202834 FTTGraphicsCleanup()
00202874 FTTGraphics_GetScreenWidth()
00202884 FTTGraphics_GetScreenHeight()
00202894 FTTGraphicsGetNativeScale()

00200764 FTTResetMaterials()
0020078C FTTBeginScene(CFTTClearSettings const&,CFTTRenderTarget *,bool)
002007B0 FTTEndScene()

002008B8 FTTGetDescriptorFromFVF(TFTTVertexDescriptor *,uint,uint)
00200A78 FTTGetFVFFromDescriptor(TFTTVertexDescriptor const*)
00200B58 FTTCreateVolatileResources()
00200B84 FTTDeleteVolatileResources()
*/

extern CFTTGraphicsBuffer *FTT_pSharedQuadIndexBuffer;
extern GLint g_iMainFBOZDepth;

struct TFTTVertexDescriptor {
  int field_0;
  int field_4;
  int field_8;
  int field_C;
  int field_10;
};

enum EScreenRotation {
  EScreenRotation_0,
  EScreenRotation_1,
  EScreenRotation_2,
  EScreenRotation_3,
  EScreenRotation_4,
  EScreenRotation_5,
};

//002005FC
void FTTGraphicsInitializeCommon();

//002006DC
void FTTGraphicsCleanupCommon();

//002007C4
int FTTGraphics_CalculateVertexSize(int);

//002008B8
void FTTGetDescriptorFromFVF(TFTTVertexDescriptor *, uint, uint);

//00200A78
int FTTGetFVFFromDescriptor(TFTTVertexDescriptor const *);

//00200B58
void FTTCreateVolatileResources();

//00200B84
void FTTDeleteVolatileResources();

//00200BAC
void FTTGraphicsInitialize_SetBufSizes(int, int);

//00200BBC
void FTTGraphicsSetScreenRotation(EScreenRotation eScreen);

//00200BC8
int FTTGraphicsGetScreenRotation();

//00200BE8
int FTTGraphics_IndexCountToPrimCount(FTTPRIMTYPE, int);

//00200C14
int FTTGraphics_PrimCountToIndexCount(FTTPRIMTYPE, int);

//00202674
void FTTGraphicsEnableStencilBuffer(bool);

//00202680
bool FTTGraphicsIsStencilBufferEnabled();

//0020268C
void FTTGraphicsAndroid_SetScreen(int, int);

//002026E8
void FTTGraphicsAndroid_SetScreenSize(float);

//002026F4
int FTTGraphicsAndroid_InitializeVulkanEarly();

//002026F8
void FTTGraphicsAndroid_OnVulkanSurfaceAcquired(ANativeWindow *pWnd);

//00202744
void FTTGraphicsAndroid_OnVulkanSurfaceLost();

//00202768
float FTTGraphicsAndroid_GetScreenSize();

//00202774
void FTTGraphicsInitialize(int);

//00202834
void FTTGraphicsCleanup();

//00202874
int FTTGraphics_GetScreenWidth();

//00202884
int FTTGraphics_GetScreenHeight();

//00202894
float FTTGraphicsGetNativeScale();

//00200764
void FTTResetMaterials();

//0020078C
bool FTTBeginScene(CFTTClearSettings const &pSetting,
                   CFTTRenderTarget *pRenderTarget,
                   bool a3);

//002007B0
void FTTEndScene();

#endif  //_FTTGraphics_H_