//*******************************************************************
//
// File: Asura_Direct3D_Botanicals_Game_Render.h
//
// Created: 13 Mar 2006
//
// Description: 
//
//*******************************************************************

#ifndef _ASURA_DIRECT3D_BOTANICALS_GAME_RENDER_H_
#define _ASURA_DIRECT3D_BOTANICALS_GAME_RENDER_H_

#if defined( ASURA_USE_BOTANICALS)

// other libraries
#include "Rendering/Asura_Direct3D.h"

// internal dependencies

// forward declarations
struct Asura_Botanicals_Instance;
class Asura_Direct3D_BGR_Manager;
class Asura_BGR_Manager;
template< class T> class Asura_LinkList;
class Asura_Mutex;

class Asura_Chunk_ResourceFile_PC_Botanical;
#if defined( ASURA_TOOLS)
class Tools_Botanicals_Statistics;
class Tools_BotanicalShape;
#endif

//*******************************************************************
// Constants
//*******************************************************************


//*******************************************************************
// Class Definitions
//*******************************************************************
class Asura_Direct3D_Botanicals_Game_Render
{
public:
	Asura_Direct3D_Botanicals_Game_Render();
	~Asura_Direct3D_Botanicals_Game_Render();
	
	static bool Initialise();
	static void ShutDown();
	
	static bool PreD3DReset();
	static bool PostD3DReset();
	
	static bool ClearDataSet();
	static bool HasDataSet();
	
	static bool Render();

	static Asura_Mutex& GetLoadingMutex();
	
#if defined( ASURA_TOOLS)
	static bool Export( HANDLE xFileHandle);
	static bool MakeDataSet( const Asura_LinkList<Asura_Botanicals_Instance*>& pxListBotanicalInstances, const bool bEditableData = false);
	static bool UpdateTypes();
	static bool UpdateTypesInteractive( const Tools_BotanicalShape* pxTypeBotanicalToolShapeFind);

	static bool RelightEverything( void);
	static bool DeleteModule( const u_int uModuleIndex);
	
	static Asura_Direct3D_BGR_Manager& GetDirect3DBGRManager();
	static Asura_BGR_Manager& GetBGRManager();
#endif

private:
#if !defined( ASURA_TOOLS)
	static Asura_Direct3D_BGR_Manager& GetDirect3DBGRManager();
	static Asura_BGR_Manager& GetBGRManager();
#endif

	friend class Asura_Chunk_ResourceFile_PC_Botanical;
#if defined( ASURA_TOOLS)
	friend class Tools_Botanicals_Statistics;
#endif
	
};

//*******************************************************************
// Inline Function Definitions
//*******************************************************************


//*******************************************************************
//
// (c) 2006 Rebellion (Derby)
//
// Warning: This computer program is protected by copyright law and 
// international treaties. Unauthorized reproduction or distribution
// of this program, or any portion of it, may result in severe civil and
// criminal penalties, and will be prosecuted to the maximum extent 
// possible under the law.
//
//*******************************************************************

#endif //defined( ASURA_USE_BOTANICALS)

#endif // _ASURA_DIRECT3D_BOTANICALS_GAME_RENDER_H_
