File: d3d9_util.cpp

package info (click to toggle)
glest 3.2.2-2
  • links: PTS, VCS
  • area: contrib
  • in suites: squeeze
  • size: 2,800 kB
  • ctags: 6,581
  • sloc: cpp: 32,575; sh: 8,341; makefile: 63
file content (21 lines) | stat: -rw-r--r-- 698 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "d3d9_util.h"

namespace Shared{ namespace Graphics{ namespace D3d9{

string d3dErrorToStr(HRESULT result){
	switch(result){
	case D3D_OK: return "D3D_OK";
	case D3DERR_DEVICELOST: return "D3DERR_DEVICELOST";
	case D3DERR_DEVICENOTRESET: return "D3DERR_DEVICENOTRESET";
	case D3DERR_DRIVERINTERNALERROR: return "D3DERR_DRIVERINTERNALERROR";
	case D3DERR_INVALIDCALL: return "D3DERR_INVALIDCALL";
	case D3DERR_MOREDATA: return "D3DERR_MOREDATA";
	case D3DERR_NOTFOUND: return "D3DERR_NOTFOUND";
	case D3DERR_OUTOFVIDEOMEMORY: return "D3DERR_OUTOFVIDEOMEMORY";
	case E_OUTOFMEMORY: return "E_OUTOFMEMORY";
	default:
		return "Unkown D3D error";
	}
}

}}}//end namespace