Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c12dc091
Commit
c12dc091
authored
Apr 22, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Add some tests for draw parameter validation.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7c774e98
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
275 additions
and
0 deletions
+275
-0
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+62
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+108
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+105
-0
No files found.
dlls/ddraw/tests/ddraw2.c
View file @
c12dc091
...
...
@@ -10092,6 +10092,67 @@ static void test_getdc(void)
DestroyWindow
(
window
);
}
static
void
test_draw_primitive
(
void
)
{
static
WORD
indices
[]
=
{
0
,
1
,
2
,
3
};
static
D3DVERTEX
quad
[]
=
{
{{
-
1
.
0
f
},
{
-
1
.
0
f
},
{
0
.
0
f
}},
{{
-
1
.
0
f
},
{
1
.
0
f
},
{
0
.
0
f
}},
{{
1
.
0
f
},
{
-
1
.
0
f
},
{
0
.
0
f
}},
{{
1
.
0
f
},
{
1
.
0
f
},
{
0
.
0
f
}},
};
IDirect3DViewport2
*
viewport
;
IDirect3DDevice2
*
device
;
IDirectDraw2
*
ddraw
;
IDirect3D2
*
d3d
;
ULONG
refcount
;
HWND
window
;
HRESULT
hr
;
window
=
CreateWindowA
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
ddraw
=
create_ddraw
();
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
if
(
!
(
device
=
create_device
(
ddraw
,
window
,
DDSCL_NORMAL
)))
{
skip
(
"Failed to create a 3D device, skipping test.
\n
"
);
IDirectDraw2_Release
(
ddraw
);
DestroyWindow
(
window
);
return
;
}
viewport
=
create_viewport
(
device
,
0
,
0
,
640
,
480
);
hr
=
IDirect3DDevice2_SetCurrentViewport
(
device
,
viewport
);
ok
(
SUCCEEDED
(
hr
),
"Failed to activate the viewport, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice2_GetDirect3D
(
device
,
&
d3d
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get D3D interface, hr %#x.
\n
"
,
hr
);
IDirect3D2_Release
(
d3d
);
hr
=
IDirect3DDevice2_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice2_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice2_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
indices
,
4
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice2_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
quad
,
4
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice2_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
quad
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice2_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
quad
,
4
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
destroy_viewport
(
device
,
viewport
);
refcount
=
IDirect3DDevice2_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
IDirectDraw2_Release
(
ddraw
);
DestroyWindow
(
window
);
}
START_TEST
(
ddraw2
)
{
IDirectDraw2
*
ddraw
;
...
...
@@ -10177,4 +10238,5 @@ START_TEST(ddraw2)
test_overlay_rect
();
test_blt
();
test_getdc
();
test_draw_primitive
();
}
dlls/ddraw/tests/ddraw4.c
View file @
c12dc091
...
...
@@ -11370,6 +11370,113 @@ static void test_getdc(void)
DestroyWindow
(
window
);
}
static
void
test_draw_primitive
(
void
)
{
static
WORD
indices
[]
=
{
0
,
1
,
2
,
3
};
static
struct
vec3
quad
[]
=
{
{
-
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
},
{
-
1
.
0
f
,
1
.
0
f
,
0
.
0
f
},
{
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
},
{
1
.
0
f
,
1
.
0
f
,
0
.
0
f
},
};
D3DDRAWPRIMITIVESTRIDEDDATA
strided
;
IDirect3DViewport3
*
viewport
;
D3DVERTEXBUFFERDESC
vb_desc
;
IDirect3DVertexBuffer
*
vb
;
IDirect3DDevice3
*
device
;
IDirect3D3
*
d3d
;
ULONG
refcount
;
HWND
window
;
HRESULT
hr
;
void
*
data
;
window
=
CreateWindowA
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
!
(
device
=
create_device
(
window
,
DDSCL_NORMAL
)))
{
skip
(
"Failed to create a 3D device, skipping test.
\n
"
);
DestroyWindow
(
window
);
return
;
}
viewport
=
create_viewport
(
device
,
0
,
0
,
640
,
480
);
hr
=
IDirect3DDevice3_SetCurrentViewport
(
device
,
viewport
);
ok
(
SUCCEEDED
(
hr
),
"Failed to activate the viewport, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_GetDirect3D
(
device
,
&
d3d
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get D3D interface, hr %#x.
\n
"
,
hr
);
memset
(
&
vb_desc
,
0
,
sizeof
(
vb_desc
));
vb_desc
.
dwSize
=
sizeof
(
vb_desc
);
vb_desc
.
dwFVF
=
D3DFVF_XYZ
;
vb_desc
.
dwNumVertices
=
4
;
hr
=
IDirect3D3_CreateVertexBuffer
(
d3d
,
&
vb_desc
,
&
vb
,
0
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create vertex buffer, hr %#x.
\n
"
,
hr
);
IDirect3D3_Release
(
d3d
);
memset
(
&
strided
,
0
,
sizeof
(
strided
));
hr
=
IDirect3DDevice3_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
indices
,
4
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
indices
,
4
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
strided
.
position
.
lpvData
=
quad
;
strided
.
position
.
dwStride
=
sizeof
(
*
quad
);
hr
=
IDirect3DVertexBuffer_Lock
(
vb
,
0
,
&
data
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to lock vertex buffer, hr %#x.
\n
"
,
hr
);
memcpy
(
data
,
quad
,
sizeof
(
quad
));
hr
=
IDirect3DVertexBuffer_Unlock
(
vb
);
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock vertex buffer, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
quad
,
4
,
NULL
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
4
,
NULL
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
NULL
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
quad
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
quad
,
4
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
4
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice3_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
IDirect3DVertexBuffer_Release
(
vb
);
destroy_viewport
(
device
,
viewport
);
refcount
=
IDirect3DDevice3_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
DestroyWindow
(
window
);
}
START_TEST
(
ddraw4
)
{
IDirectDraw4
*
ddraw
;
...
...
@@ -11463,4 +11570,5 @@ START_TEST(ddraw4)
test_blt
();
test_color_clamping
();
test_getdc
();
test_draw_primitive
();
}
dlls/ddraw/tests/ddraw7.c
View file @
c12dc091
...
...
@@ -11640,6 +11640,110 @@ static void test_getdc(void)
DestroyWindow
(
window
);
}
static
void
test_draw_primitive
(
void
)
{
static
WORD
indices
[]
=
{
0
,
1
,
2
,
3
};
static
struct
vec3
quad
[]
=
{
{
-
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
},
{
-
1
.
0
f
,
1
.
0
f
,
0
.
0
f
},
{
1
.
0
f
,
-
1
.
0
f
,
0
.
0
f
},
{
1
.
0
f
,
1
.
0
f
,
0
.
0
f
},
};
D3DDRAWPRIMITIVESTRIDEDDATA
strided
;
D3DVERTEXBUFFERDESC
vb_desc
;
IDirect3DVertexBuffer7
*
vb
;
IDirect3DDevice7
*
device
;
IDirect3D7
*
d3d
;
ULONG
refcount
;
HWND
window
;
HRESULT
hr
;
void
*
data
;
window
=
CreateWindowA
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
!
(
device
=
create_device
(
window
,
DDSCL_NORMAL
)))
{
skip
(
"Failed to create a 3D device, skipping test.
\n
"
);
DestroyWindow
(
window
);
return
;
}
hr
=
IDirect3DDevice7_GetDirect3D
(
device
,
&
d3d
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get D3D interface, hr %#x.
\n
"
,
hr
);
memset
(
&
vb_desc
,
0
,
sizeof
(
vb_desc
));
vb_desc
.
dwSize
=
sizeof
(
vb_desc
);
vb_desc
.
dwFVF
=
D3DFVF_XYZ
;
vb_desc
.
dwNumVertices
=
4
;
hr
=
IDirect3D7_CreateVertexBuffer
(
d3d
,
&
vb_desc
,
&
vb
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create vertex buffer, hr %#x.
\n
"
,
hr
);
IDirect3D7_Release
(
d3d
);
memset
(
&
strided
,
0
,
sizeof
(
strided
));
hr
=
IDirect3DDevice7_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
NULL
,
0
,
0
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
NULL
,
0
,
indices
,
4
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
0
,
indices
,
4
,
0
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
0
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
strided
.
position
.
lpvData
=
quad
;
strided
.
position
.
dwStride
=
sizeof
(
*
quad
);
hr
=
IDirect3DVertexBuffer7_Lock
(
vb
,
0
,
&
data
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to lock vertex buffer, hr %#x.
\n
"
,
hr
);
memcpy
(
data
,
quad
,
sizeof
(
quad
));
hr
=
IDirect3DVertexBuffer7_Unlock
(
vb
);
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock vertex buffer, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
quad
,
4
,
NULL
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
4
,
NULL
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
4
,
NULL
,
0
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
quad
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitive
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
quad
,
4
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveStrided
(
device
,
D3DPT_TRIANGLESTRIP
,
D3DFVF_XYZ
,
&
strided
,
4
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_DrawIndexedPrimitiveVB
(
device
,
D3DPT_TRIANGLESTRIP
,
vb
,
0
,
4
,
indices
,
4
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
IDirect3DVertexBuffer7_Release
(
vb
);
refcount
=
IDirect3DDevice7_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
DestroyWindow
(
window
);
}
START_TEST
(
ddraw7
)
{
HMODULE
module
=
GetModuleHandleA
(
"ddraw.dll"
);
...
...
@@ -11744,4 +11848,5 @@ START_TEST(ddraw7)
test_blt
();
test_color_clamping
();
test_getdc
();
test_draw_primitive
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment