More D3D error checking. Patch from ruben_balea
This commit is contained in:
parent
9687b218d1
commit
a31ab58d64
2 changed files with 11 additions and 7 deletions
|
|
@ -123,14 +123,16 @@ static void d3d_fs_init_objects()
|
|||
int y;
|
||||
RECT r;
|
||||
|
||||
d3ddev->CreateVertexBuffer(12*sizeof(CUSTOMVERTEX),
|
||||
if (FAILED(d3ddev->CreateVertexBuffer(12*sizeof(CUSTOMVERTEX),
|
||||
0,
|
||||
D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1,
|
||||
D3DPOOL_MANAGED,
|
||||
&v_buffer,
|
||||
NULL);
|
||||
NULL)))
|
||||
fatal("CreateVertexBuffer failed\n");
|
||||
|
||||
d3ddev->CreateTexture(2048, 2048, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_MANAGED, &d3dTexture, NULL);
|
||||
if (FAILED(d3ddev->CreateTexture(2048, 2048, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_MANAGED, &d3dTexture, NULL)))
|
||||
fatal("CreateTexture failed\n");
|
||||
|
||||
r.top = r.left = 0;
|
||||
r.bottom = r.right = 2047;
|
||||
|
|
|
|||
|
|
@ -100,15 +100,17 @@ void d3d_init_objects()
|
|||
int y;
|
||||
RECT r;
|
||||
|
||||
d3ddev->CreateVertexBuffer(12*sizeof(CUSTOMVERTEX),
|
||||
if (FAILED(d3ddev->CreateVertexBuffer(12*sizeof(CUSTOMVERTEX),
|
||||
0,
|
||||
D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1,
|
||||
D3DPOOL_MANAGED,
|
||||
&v_buffer,
|
||||
NULL);
|
||||
NULL)))
|
||||
fatal("CreateVertexBuffer failed\n");
|
||||
|
||||
d3ddev->CreateTexture(2048, 2048, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_MANAGED, &d3dTexture, NULL);
|
||||
|
||||
if (FAILED(d3ddev->CreateTexture(2048, 2048, 1, 0, D3DFMT_X8R8G8B8, D3DPOOL_MANAGED, &d3dTexture, NULL)))
|
||||
fatal("CreateTexture failed\n");
|
||||
|
||||
r.top = r.left = 0;
|
||||
r.bottom = r.right = 2047;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue