2 * Copyright 2010 Christian Costa
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "wine/test.h"
22 static void test_create_line(IDirect3DDevice9
* device
)
25 LPD3DXLINE line
= NULL
;
27 hr
= D3DXCreateLine(NULL
, &line
);
28 ok(hr
== D3DERR_INVALIDCALL
, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr
, D3DERR_INVALIDCALL
);
30 hr
= D3DXCreateLine(device
, NULL
);
31 ok(hr
== D3DERR_INVALIDCALL
, "Got result %x, expected %x (D3D_INVALIDCALL)\n", hr
, D3DERR_INVALIDCALL
);
33 hr
= D3DXCreateLine(device
, &line
);
34 ok(hr
== D3D_OK
, "Got result %x, expected 0 (D3D_OK)\n", hr
);
37 ID3DXLine_Release(line
);
44 IDirect3DDevice9
* device
;
45 D3DPRESENT_PARAMETERS d3dpp
;
48 wnd
= CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL
, NULL
, NULL
, NULL
);
49 d3d
= Direct3DCreate9(D3D_SDK_VERSION
);
51 skip("Couldn't create application window\n");
55 skip("Couldn't create IDirect3D9 object\n");
60 ZeroMemory(&d3dpp
, sizeof(d3dpp
));
61 d3dpp
.Windowed
= TRUE
;
62 d3dpp
.SwapEffect
= D3DSWAPEFFECT_DISCARD
;
63 hr
= IDirect3D9_CreateDevice(d3d
, D3DADAPTER_DEFAULT
, D3DDEVTYPE_HAL
, wnd
, D3DCREATE_MIXED_VERTEXPROCESSING
, &d3dpp
, &device
);
65 skip("Failed to create IDirect3DDevice9 object %#x\n", hr
);
66 IDirect3D9_Release(d3d
);
71 test_create_line(device
);
73 IDirect3DDevice9_Release(device
);
74 IDirect3D9_Release(d3d
);