//=============================================================================
// FILE: app.h
//
//                  Copyright (c) 2017 QUALCOMM Technologies Inc.
//                              All Rights Reserved.
//
//=============================================================================

#pragma once

#include "../../common/spatialaudio_common.h"
#include <glm/glm.hpp>


class ObjectStatic : public SpatialAudioCommon
{
public:

	virtual void Initialize();
	virtual void Shutdown();

protected:
	virtual void OnTouchScreen();
	virtual void RenderModelCallback(int whichEye, float elapsedTime);
	virtual void RenderCallback(float elapsedTime);

private:
	#define						SPATIAL_AUDIO_SOUND_OBJECT_NUM 16
	Q3DSound					mSoundObject[SPATIAL_AUDIO_SOUND_OBJECT_NUM];
	glm::mat4                   mSoundObjectLocalToWorld[SPATIAL_AUDIO_SOUND_OBJECT_NUM];
	glm::vec3					mSoundObjectPosition[SPATIAL_AUDIO_SOUND_OBJECT_NUM];
	
	glm::vec3                   mSoundObjectColorDefault[SPATIAL_AUDIO_SOUND_OBJECT_NUM];
	float						mSoundObjectSphereLastHsvSaturation[SPATIAL_AUDIO_SOUND_OBJECT_NUM];
	float						mSoundObjectSphereLastHsvValue[SPATIAL_AUDIO_SOUND_OBJECT_NUM];

	Svr::SvrGeometry*           mpGazeBoxModel;
	Svr::SvrShader              mGazeBoxShader;
	GLuint						mGazeBoxTexture[kGazeBoxNum];
    GLuint                      mGazeBoxTextureSampler;
	bool						mGazeBoxActive[kGazeBoxNum];
	float						mGazeBoxLastHsvSaturation[kGazeBoxNum];
	float						mGazeBoxLastHsvValue[kGazeBoxNum];

	Svr::SvrGeometry*           mpSkyModel;
	Svr::SvrShader              mSkyShader;
	GLuint						mSkyTexture;

	Svr::SvrGeometry*           mpFloorModel;
	Svr::SvrShader              mFloorShader;
	GLuint						mFloorTexture;

	Svr::SvrGeometry*           mpSphereModel;
	Svr::SvrShader              mSphereShader;
};