mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
move TestDrawPrimFailure to .cxx
This commit is contained in:
parent
aa5d035340
commit
998611d189
@ -16,26 +16,6 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#if defined(_DEBUG) || defined(COUNT_DRAWPRIMS)
|
|
||||||
typedef enum {DrawPrim,DrawIndexedPrim} DP_Type;
|
|
||||||
static const char *DP_Type_Strs[3] = {"DrawPrimitive","DrawIndexedPrimitive"};
|
|
||||||
|
|
||||||
void INLINE TestDrawPrimFailure(DP_Type dptype,HRESULT hr,IDirect3DDevice8 *pD3DDevice,DWORD nVerts,DWORD nTris) {
|
|
||||||
if(FAILED(hr)) {
|
|
||||||
// loss of exclusive mode is not a real DrawPrim problem, ignore it
|
|
||||||
HRESULT testcooplvl_hr = pD3DDevice->TestCooperativeLevel();
|
|
||||||
if((testcooplvl_hr != D3DERR_DEVICELOST)||(testcooplvl_hr != D3DERR_DEVICENOTRESET)) {
|
|
||||||
dxgsg8_cat.fatal() << DP_Type_Strs[dptype] << "() failed: result = " << D3DERRORSTRING(hr);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CountDPs(nVerts,nTris);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#define TestDrawPrimFailure(a,b,c,nVerts,nTris) CountDPs(nVerts,nTris);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
INLINE DWORD
|
INLINE DWORD
|
||||||
Colorf_to_D3DCOLOR(const Colorf &cColorf) {
|
Colorf_to_D3DCOLOR(const Colorf &cColorf) {
|
||||||
|
@ -136,6 +136,26 @@ set_color_clear_value(const Colorf& value) {
|
|||||||
_d3dcolor_clear_value = Colorf_to_D3DCOLOR(value);
|
_d3dcolor_clear_value = Colorf_to_D3DCOLOR(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_DEBUG) || defined(COUNT_DRAWPRIMS)
|
||||||
|
typedef enum {DrawPrim,DrawIndexedPrim} DP_Type;
|
||||||
|
static const char *DP_Type_Strs[3] = {"DrawPrimitive","DrawIndexedPrimitive"};
|
||||||
|
|
||||||
|
void INLINE TestDrawPrimFailure(DP_Type dptype,HRESULT hr,IDirect3DDevice8 *pD3DDevice,DWORD nVerts,DWORD nTris) {
|
||||||
|
if(FAILED(hr)) {
|
||||||
|
// loss of exclusive mode is not a real DrawPrim problem, ignore it
|
||||||
|
HRESULT testcooplvl_hr = pD3DDevice->TestCooperativeLevel();
|
||||||
|
if((testcooplvl_hr != D3DERR_DEVICELOST)||(testcooplvl_hr != D3DERR_DEVICENOTRESET)) {
|
||||||
|
dxgsg8_cat.fatal() << DP_Type_Strs[dptype] << "() failed: result = " << D3DERRORSTRING(hr);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CountDPs(nVerts,nTris);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define TestDrawPrimFailure(a,b,c,nVerts,nTris) CountDPs(nVerts,nTris);
|
||||||
|
#endif
|
||||||
|
|
||||||
DXShaderHandle DXGraphicsStateGuardian8::
|
DXShaderHandle DXGraphicsStateGuardian8::
|
||||||
read_pixel_shader(string &filename) {
|
read_pixel_shader(string &filename) {
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user