#include "d3d_obj.h"
// Declare our static variables
IDirect3D9* CD3DObj::mInterface = NULL;
IDirect3DDevice9* CD3DObj::mDevice = NULL;
ID3DXEffect* CD3DObj::mEffect = NULL;
HRESULT CD3DObj::mResult = 0;
// Initializes our D3D object -- Returns true on success, false otherwise
bool CD3DObj::init(HWND hwnd)
{
// Create the D3D object, which is needed to create the D3DDevice.
mInterface = Direct3DCreate9(D3D_SDK_VERSION);
// Error Check
if(mInterface == NULL)
return false;
// This is the structure that defines how our 3D device (the thing that allows us
// to render) is going to be created.
D3DPRESENT_PARAMETERS params = {0}; // Start by zeroing out the parameters