//////////////////////////////////////////////////////////////////////////////////////////
//
//  FILE        :  Asura_Direct3D_Utilities.cpp
//
//  CREATED     :  Richard J. Fine  (11.11.2004)
//
//  Copyright (C) 2004 Rebellion, All Rights Reserved.
//
//////////////////////////////////////////////////////////////////////////////////////////


#include "Core/Asura.h"

// This file's header.
#include "Rendering/Asura_Direct3D_Utilities.h"

#ifdef ASURA_ASSERT

char Asura_Direct3D_StateString::szString[Asura_Direct3D_StateString::NUMBER_OF_STATES+1];

void Asura_Direct3D_StateString::MakeString()
{
	for(u_int u = 0; u < Asura_Direct3D_StateString::NUMBER_OF_STATES; ++u)
	{
		DWORD rs;
		Asura_Direct3D::D3DDevice->GetRenderState((D3DRENDERSTATETYPE)u, &rs);
		szString[u] = static_cast<char>('a' + (rs & 0x0000000F));
	}
	szString[NUMBER_OF_STATES] = 0;
}

void Asura_Direct3D_StateString::WriteToDebugger()
{
	OutputDebugString("D3D State: ");
	OutputDebugString(szString);
	OutputDebugString("\n");
}

#endif//ASURA_ASSERT
