#ifndef __D3DDefs__
#define __D3DDefs__

#include <windows.h>
#include <d3d10_1.h>
#include <d3dx10.h>
#include <d3dx10math.h>
#include <dxgi.h>

struct Vertex {
    D3DXVECTOR3 Pos;
    D3DXVECTOR3 Norm;
    D3DXVECTOR3 Tang;
    D3DXVECTOR2 Tex;
};


template<class Interface> inline void safeRelease(Interface **ppInterfaceToRelease) {
    if (ppInterfaceToRelease != NULL) {
        if (*ppInterfaceToRelease != NULL) {
            (*ppInterfaceToRelease)->Release();
            (*ppInterfaceToRelease) = NULL;
        }
    }
}


#endif