///////////////////////////////////////////////////////////////////////////////
/// @file deSurface.hpp
///
/// @brief Surface attributes for rendering with
///
/// @author Assassin
///
/// 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 June 2003
/// @author Assassin
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

#ifndef DESURFACE_HPP
#define DESURFACE_HPP

#include "deRenderStates.hpp"
#include "deWorld.hpp"

#ifdef USING_DESTINY3D
#ifdef _DEBUG
#	ifdef DESTINY3D_STATIC_LINK
#		pragma comment(lib, "deDriver_sd")
#	else
#		pragma comment(lib, "deDriverd")
#	endif //DESTINY3D_STATIC_LINK
#else
#	ifdef DESTINY3D_STATIC_LINK
#		pragma comment(lib, "deDriver_s")
#	else
#		pragma comment(lib, "deDriver")
#	endif //DESTINY3D_STATIC_LINK
#endif //_DEBUG
#endif //USING_DESTINY3D

class IdeSurface;

// C export factory functions
/// Create an instance of IdeSurface
RENDERSTATE_API IdeSurface* IdeSurface_CreateSurface();
/// Get the IdeSurface WorldObject interface ID
RENDERSTATE_API long IdeSurface_GetWOInterfaceID();

/// Container & processing class for handling surface attributes of geometry.
/// Related functions: IdeSurface_CreateSurface, IdeSurface_GetWOInterfaceID
//class IdeSurface : virtual public IdeWorldObject
DE3D_INTERFACE(IdeSurface, IdeWorldObject)
{
protected:
	virtual ~IdeSurface() {}
public:

	/// set an IdeRenderTexture (placeholder method while refactoring)
	virtual void	SetRenderTexture(IdeRenderTexture* pRT) = 0;
	/// set an IdeRenderMaterial (placeholder method while refactoring)
	virtual void	SetRenderMaterial(IdeRenderMaterial* pRM) = 0;

	virtual IdeRenderTexture*	GetRenderTexture() = 0;
	virtual IdeRenderMaterial*	GetRenderMaterial() = 0;
};

//DE3D_INTERFACE(IdeTextureSet, IdeWorldObject)
DE3D_INTERFACE(IdeTextureSet, IdeRefCountBase)
{
protected:
	virtual ~IdeTextureSet() {}
public:
	
	virtual u32	GetNumTextures() const = 0;
	virtual const char* GetNameByIndex(s32 index) const = 0;
	virtual s32 GetIndexByName(const char* name) const = 0;
	virtual IdeBitmapProxy* GetTextureByIndex(s32 index) const = 0;
	virtual IdeBitmapProxy* GetTextureByName(const char* name) const = 0;
	
	virtual deBoolean AddTextureName(const char* name, s32* index) = 0;
	virtual deBoolean SetTextureByIndex(s32 index, IdeBitmapProxy* tex) = 0;
	virtual deBoolean SetTextureByName(const char* name, IdeBitmapProxy* tex) = 0;
	
	virtual IdeTextureSet*	CloneTextureSet(const char** names) = 0;
};

#endif //DESURFACE_HPP

