/*
This source file is part of Castor3D (http://castor3d.developpez.com/castor3d.htm)

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with
the program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
http://www.gnu.org/copyleft/lesser.txt.
*/
#ifndef ___Dx10___
#define ___Dx10___

#if defined( _MSC_VER )
#	pragma warning( push )
#	pragma warning( disable:4005 )	// Redéfinition de macrao
#	pragma warning( disable:4311 )
#	pragma warning( disable:4312 )
#endif

#if defined __GNUG__
#   define __in
#   define __inout
#   define __out
#   define __in_opt
#   define __inout_opt
#   define __out_opt
#   define __deref_out_range(A,B)
#   define __in_bcount(a)
#   define __in_ecount(a)
#   define __in_bcount_opt(a)
#   define __in_ecount_opt(a)
#   define __out_bcount(a)
#   define __out_ecount(a)
#   define __out_bcount_opt(a)
#   define __out_ecount_opt(a)
#   define __out_ecount_part_opt(a,b)
#   define __deref_out
#   define __deref_out_opt
#   define __RPC__deref_out
#   define _COM_Outptr_
#   define _Out_
#   define _Out_opt_
#   define _In_
#   define _In_opt_
#   define _In_z_
#   define _In_opt_z_
#   define _In_reads_bytes_(x)
#   define _Out_writes_bytes_(x)
#   define _In_reads_(x)
#   define _Out_writes_(x)
#   define _Outptr_result_z_
#   define _Outptr_result_opt_z_
#   define _Outptr_
#   define _Outptr_opt_
#   define _Inout_
#   define _Inout_opt_
#   define _Outptr_result_maybenull_
#   define _Outptr_opt_result_maybenull_
#   define WINAPI_INLINE

typedef uint8_t UINT8;
// to prevent includes of DxGI.h
#	define __WIDL_DXGI_H
#endif

#include <Windows.h>
#include <initguid.h>
#include <D3Dcommon.h>
#include <D3D10.h>
#include <D3dx10.h>
//#include <d3dx10math.h>
#include <DXGI.h>

#if defined __GNUG__

#	ifndef __uuidof
#		define __uuidof(x) IID_##x
#	endif

#   ifdef DECLARE_GUID
#       undef DECLARE_GUID
#   endif
#   define DECLARE_GUID( id, a, b, c, d, e, f, g, h, i, j, k ) extern const GUID id;

	DECLARE_GUID( IID_ID3D10DeviceChild,			0x1841e5c8, 0x16b0, 0x489b, 0xbc, 0xc8, 0x44, 0xcf, 0xb0, 0xd5, 0xde, 0xae );
	DECLARE_GUID( IID_ID3D10DepthStencilState,		0x03823efb, 0x8d8f, 0x4e1c, 0x9a, 0xa2, 0xf6, 0x4b, 0xb2, 0xcb, 0xfd, 0xf1 );
	DECLARE_GUID( IID_ID3D10BlendState,				0x75b68faa, 0x347d, 0x4159, 0x8f, 0x45, 0xa0, 0x64, 0x0f, 0x01, 0xcd, 0x9a );
	DECLARE_GUID( IID_ID3D10RasterizerState,		0x9bb4ab81, 0xab1a, 0x4d8f, 0xb5, 0x06, 0xfc, 0x04, 0x20, 0x0b, 0x6e, 0xe7 );
	DECLARE_GUID( IID_ID3D10Resource,				0xdc8e63f3, 0xd12b, 0x4952, 0xb4, 0x7b, 0x5e, 0x45, 0x02, 0x6a, 0x86, 0x2d );
	DECLARE_GUID( IID_ID3D10Buffer,					0x48570b85, 0xd1ee, 0x4fcd, 0xa2, 0x50, 0xeb, 0x35, 0x07, 0x22, 0xb0, 0x37 );
	DECLARE_GUID( IID_ID3D10Texture1D,				0xf8fb5c27, 0xc6b3, 0x4f75, 0xa4, 0xc8, 0x43, 0x9a, 0xf2, 0xef, 0x56, 0x4c );
	DECLARE_GUID( IID_ID3D10Texture2D,				0x6f15aaf2, 0xd208, 0x4e89, 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c );
	DECLARE_GUID( IID_ID3D10Texture3D,				0x037e866e, 0xf56d, 0x4357, 0xa8, 0xaf, 0x9d, 0xab, 0xbe, 0x6e, 0x25, 0x0e );
	DECLARE_GUID( IID_ID3D10View,					0x839d1216, 0xbb2e, 0x412b, 0xb7, 0xf4, 0xa9, 0xdb, 0xeb, 0xe0, 0x8e, 0xd1 );
	DECLARE_GUID( IID_ID3D10ShaderResourceView,		0xb0e06fe0, 0x8192, 0x4e1a, 0xb1, 0xca, 0x36, 0xd7, 0x41, 0x47, 0x10, 0xb2 );
	DECLARE_GUID( IID_ID3D10RenderTargetView,		0xdfdba067, 0x0b8d, 0x4865, 0x87, 0x5b, 0xd7, 0xb4, 0x51, 0x6c, 0xc1, 0x64 );
	DECLARE_GUID( IID_ID3D10DepthStencilView,		0x9fdac92a, 0x1876, 0x48c3, 0xaf, 0xad, 0x25, 0xb9, 0x4f, 0x84, 0xa9, 0xb6 );
	DECLARE_GUID( IID_ID3D10UnorderedAccessView,	0x28acf509, 0x7f5c, 0x48f6, 0x86, 0x11, 0xf3, 0x16, 0x01, 0x0a, 0x63, 0x80 );
	DECLARE_GUID( IID_ID3D10VertexShader,			0x3b301d64, 0xd678, 0x4289, 0x88, 0x97, 0x22, 0xf8, 0x92, 0x8b, 0x72, 0xf3 );
	DECLARE_GUID( IID_ID3D10HullShader,				0x8e5c6061, 0x628a, 0x4c8e, 0x82, 0x64, 0xbb, 0xe4, 0x5c, 0xb3, 0xd5, 0xdd );
	DECLARE_GUID( IID_ID3D10DomainShader,			0xf582c508, 0x0f36, 0x490c, 0x99, 0x77, 0x31, 0xee, 0xce, 0x26, 0x8c, 0xfa );
	DECLARE_GUID( IID_ID3D10GeometryShader,			0x38325b96, 0xeffb, 0x4022, 0xba, 0x02, 0x2e, 0x79, 0x5b, 0x70, 0x27, 0x5c );
	DECLARE_GUID( IID_ID3D10PixelShader,			0xea82e40d, 0x51dc, 0x4f33, 0x93, 0xd4, 0xdb, 0x7c, 0x91, 0x25, 0xae, 0x8c );
	DECLARE_GUID( IID_ID3D10ComputeShader,			0x4f5b196e, 0xc2bd, 0x495e, 0xbd, 0x01, 0x1f, 0xde, 0xd3, 0x8e, 0x49, 0x69 );
	DECLARE_GUID( IID_ID3D10InputLayout,			0xe4819ddc, 0x4cf0, 0x4025, 0xbd, 0x26, 0x5d, 0xe8, 0x2a, 0x3e, 0x07, 0xb7 );
	DECLARE_GUID( IID_ID3D10SamplerState,			0xda6fea51, 0x564c, 0x4487, 0x98, 0x10, 0xf0, 0xd0, 0xf9, 0xb4, 0xe3, 0xa5 );
	DECLARE_GUID( IID_ID3D10Asynchronous,			0x4b35d0cd, 0x1e15, 0x4258, 0x9c, 0x98, 0x1b, 0x13, 0x33, 0xf6, 0xdd, 0x3b );
	DECLARE_GUID( IID_ID3D10Query,					0xd6c00747, 0x87b7, 0x425e, 0xb8, 0x4d, 0x44, 0xd1, 0x08, 0x56, 0x0a, 0xfd );
	DECLARE_GUID( IID_ID3D10Predicate,				0x9eb576dd, 0x9f77, 0x4d86, 0x81, 0xaa, 0x8b, 0xab, 0x5f, 0xe4, 0x90, 0xe2 );
	DECLARE_GUID( IID_ID3D10Counter,				0x6e8c49fb, 0xa371, 0x4770, 0xb4, 0x40, 0x29, 0x08, 0x60, 0x22, 0xb7, 0x41 );
	DECLARE_GUID( IID_ID3D10ClassInstance,			0xa6cd7faa, 0xb0b7, 0x4a2f, 0x94, 0x36, 0x86, 0x62, 0xa6, 0x57, 0x97, 0xcb );
	DECLARE_GUID( IID_ID3D10ClassLinkage,			0xddf57cba, 0x9543, 0x46e4, 0xa1, 0x2b, 0xf2, 0x07, 0xa0, 0xfe, 0x7f, 0xed );
	DECLARE_GUID( IID_ID3D10CommandList,			0xa24bc4d1, 0x769e, 0x43f7, 0x80, 0x13, 0x98, 0xff, 0x56, 0x6c, 0x18, 0xe2 );
	DECLARE_GUID( IID_ID3D10Device,					0xdb6f6ddb, 0xac77, 0x4e88, 0x82, 0x53, 0x81, 0x9d, 0xf9, 0xbb, 0xf1, 0x40 );
	DECLARE_GUID( IID_IDXGIFactory,					0x7b7166ec, 0x21c7, 0x44ae, 0xb2, 0x1a, 0xc9, 0xae, 0x32, 0x1a, 0xe3, 0x69 );
#endif

#if !defined( NDEBUG )
#	if !defined( D3D_DEBUG_INFO )
#		define D3D_DEBUG_INFO
#	endif
#endif

#if defined( _MSC_VER )
#	pragma warning( pop )
#endif

#endif
