///////////////////////////////////////////////////////////////////////////////
/// @file Destiny3D.hpp
///
/// @brief Destiny3D Engine Library For Applications
///
/// @author Hootie
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date Oct 2001
/// @author Hootie
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

#ifndef DESTINY3D_HPP
#define DESTINY3D_HPP

#if defined(DESTINY3D_DLL_EXPORTS) || defined(DESTINY3D_EXPORT_ALL)
#	define DESTINY3D_API extern "C" DEDLL_EXPORT
#elif defined(DESTINY3D_STATIC_LINK)
#	define DESTINY3D_API extern "C"
#else
#	define DESTINY3D_API extern "C" DEDLL_IMPORT
#endif

#if !defined(DESTINY3D_EXPORT_ALL) && !defined(DESTINY3D_DLL_EXPORTS)
#	if defined(USING_DESTINY3D_DLL)
#		undef USING_DESTINY3D
#		ifdef _DEBUG
#			pragma comment(lib, "_Destiny3D_sdlld")
#		else
#			pragma comment(lib, "_Destiny3D_sdll")
#		endif //_DEBUG
#	elif defined(USING_DESTINY3D)
#		ifdef _DEBUG
#			ifdef DESTINY3D_STATIC_LINK
#				pragma comment(lib, "_Destiny3D_sd")
#			else
#				pragma comment(lib, "_Destiny3Dd")
#			endif //DESTINY3D_STATIC_LINK
#		else
#			ifdef DESTINY3D_STATIC_LINK
#				pragma comment(lib, "_Destiny3D_s")
#			else
#				pragma comment(lib, "_Destiny3D")
#			endif //DESTINY3D_STATIC_LINK
#		endif //_DEBUG
#	endif //USING_DESTINY3D
#endif //!defined(DESTINY3D_EXPORT_ALL) && !defined(DESTINY3D_DLL_EXPORTS)

//=================================================================================
// Includes
//=================================================================================

#include "deGlobalTypes.hpp"
#include "deDriver.hpp"
#include "deThread.hpp"


//=================================================================================
// Function Prototypes
//=================================================================================

class IDestiny3DFactory;

DESTINY3D_API deBoolean Destiny3D_Init(const char *AppName = NULL);
DESTINY3D_API deBoolean Destiny3D_ShutDown(void);

DESTINY3D_API IDestiny3DFactory* Destiny3D_GetFactory();

class IdeResourceManager;
class IdeSceneGraph;
class Ide2DCollection;
class IdeFont;
class IdeBitmap;
class IdeBitmapProxy;
class IdeResourceBase;
class IdeDriverLoad;
class IdeVertexBuffer;
class IdeSurface;
class IdeRenderTexture;
class IdeRenderMaterial;
class IdeRenderLight;
class IdeFileMemory;
class IdeFilePlugin;
class IdeFSReal;
class IdeFSVirtual;
class IdePluginTwofish;
class IdePluginRijndael;
class IdePluginZLib;
class IdePluginSHA1;
class IdeRender;
class IdeCamera;
class IdePlaneFrustum;
class IdePortal;
class IdeCollision;
class IdeSceneRoom;
class IdeSceneABT;
class IdeSceneActor;
class IdeSceneSky;
class IdeSceneStaticMesh;
class IdeSceneTerrain;
class IdeSceneLight;
class IdeWorldManager;
class IdeMesh;
class IdeThread;
class IdeThreadLock;
class IdeThreadPool;

DE3D_INTERFACE_(IDestiny3DFactory)
{
protected:
	virtual ~IDestiny3DFactory() {}
public:
	virtual void				ShutDown() = 0;
	
	// interface queries
	virtual long				GetIdeBitmapRscInterfaceID() = 0;
	virtual long				GetIdeBitmapProxyWOInterfaceID() = 0;
	virtual long				GetIdeAnimatedMeshRscInterfaceID() = 0;
	virtual long				GetIdeSurfaceWOInterfaceID() = 0;
	virtual long				GetIdeRenderStateWOInterfaceID() = 0;
	virtual long				GetIdeSceneRoomWOInterfaceID() = 0;
	virtual long				GetIdeSceneObjectWOInterfaceID() = 0;
	virtual long				GetIdeMeshWOInterfaceID() = 0;

	// singletons
	virtual IdeResourceManager*	GetIdeResourceManager() = 0;
	virtual IdeRender*			GetIdeRender() = 0;
	virtual IdeSceneGraph*		GetIdeSceneGraph() = 0;
	virtual IdeWorldManager*	GetIdeWorldManager() = 0;
	virtual IdeThreadPool*		GetIdeThreadPool(u32 minThreadCount) = 0;

	// creators
	virtual Ide2DCollection*	CreateIde2DCollection() = 0;
	virtual IdeFont*			CreateIdeFont() = 0;
	virtual IdeBitmap*			CreateIdeBitmap() = 0;
	virtual IdeBitmap*			CreateIdeBitmapWithInfo(s32 Width, s32 Height, IdeDriver::BPP Format, deBoolean CubeMap = deFALSE) = 0;
	virtual IdeBitmapProxy*		CreateIdeBitmapProxy(IdeResourceBase* FromBitmap = NULL) = 0;
	virtual IdeMesh*			CreateIdeMesh() = 0;
	virtual IdeDriverLoad*		CreateIdeDriverLoad(char const * path) = 0;
	virtual IdeVertexBuffer*	CreateIdeVertexBuffer() = 0;
	virtual IdeSurface*			CreateIdeSurface() = 0;
	virtual IdeRenderTexture*	CreateIdeRenderTexture() = 0;
	virtual IdeRenderMaterial*	CreateIdeRenderMaterial() = 0;
	virtual IdeRenderLight*		CreateIdeRenderLight() = 0;
	virtual IdeFileMemory*		CreateIdeFileMemory() = 0;
	virtual IdeFilePlugin*		CreateIdeFilePlugin() = 0;
	virtual IdeFSReal*			CreateIdeFSReal() = 0;
	virtual IdeFSVirtual*		CreateIdeFSVirtual() = 0;
	virtual IdePluginTwofish*	CreateIdePluginTwofish() = 0;
	virtual IdePluginRijndael*	CreateIdePluginRijndael() = 0;
	virtual IdePluginZLib*		CreateIdePluginZLib() = 0;
	virtual IdePluginSHA1*		CreateIdePluginSHA1() = 0;
	virtual IdeCamera*			CreateIdeCamera() = 0;
	virtual IdePlaneFrustum*	CreateIdePlaneFrustum() = 0;
	virtual IdePortal*			CreateIdePortal() = 0;
	virtual IdeCollision*		CreateIdeCollision() = 0;
	virtual IdeSceneRoom*		CreateIdeSceneRoom() = 0;
	virtual IdeSceneABT *		CreateIdeSceneABT() = 0;
	virtual IdeSceneActor*		CreateIdeSceneActor() = 0;
	virtual IdeSceneSky *		CreateIdeSceneSky() = 0;
	virtual IdeSceneStaticMesh*	CreateIdeSceneStaticMesh() = 0;
	virtual IdeSceneTerrain*	CreateIdeSceneTerrain() = 0;
	virtual IdeSceneLight*		CreateIdeSceneLight() = 0;
	virtual IdeThread*			CreateIdeThread(IdeThread::ThreadProc threadProc) = 0;
	virtual IdeThreadLock*		CreateIdeThreadLock(u32 spinCount = 1024) = 0;
};

#endif  //End DESTINY3D_HPP

