#ifndef SKY_H_
#define SKY_H_

//extern cJSON *json = NULL;
extern int hh,mm,ss;
extern int lapsedDays;
extern float totalTime;
extern int adjustStartTime; // 6 hr after midnight
extern float timeSpeed;

extern unsigned int SKY_INDICES;
extern unsigned int skyVAO, skyVBO, skyEBO;
extern unsigned int SUN_INDICES;
extern unsigned int sunVAO, sunVBO, sunEBO;
extern unsigned int MOON_INDICES;
extern unsigned int moonVAO, moonVBO, moonEBO;
extern float sunTheta;
extern float sunPhi;
extern float moonTheta;
extern float moonPhi;
extern Vec3 sunpos, moonpos;
extern float daytime;

int InitializeSky();
int RenderSun(mat4x4 *vc);
int RenderMoon(mat4x4 *vc);
int RenderSky();

extern float cloudAmp;
extern float cloudFreq;
extern float cloudNextAmp;
//extern float cloudNextFreq;
extern float cloudLastAmp;
//extern float cloudLastFreq;
extern float cloudNextTime;
extern float cloudLastTime;
int RenderClouds();

// sky box related
extern int skytexloaded;

extern float skysize;
extern unsigned int skytex[6];
extern int skylen;
int unloadSkyImages();
int loadSkyImages();

extern unsigned int sky_dirx[6];
extern unsigned int sky_diry[6];
extern unsigned int sky_dirz[6];
int drawSkyBox();

#endif
