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
1d3889fa
Commit
1d3889fa
authored
Feb 05, 2009
by
Luis C. Busquets Pérez
Committed by
Alexandre Julliard
Feb 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Add tests for D3DXGetFVFVertexSize.
parent
496bc4d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
110 additions
and
0 deletions
+110
-0
mesh.c
dlls/d3dx8/tests/mesh.c
+110
-0
No files found.
dlls/d3dx8/tests/mesh.c
View file @
1d3889fa
/*
* Copyright 2008 David Adam
* Copyright 2008 Luis Busquets
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -22,6 +23,10 @@
#define admitted_error 0.0001f
#define compare_vertex_sizes(type, exp) \
got=D3DXGetFVFVertexSize(type); \
ok(got==exp, "Expected: %d, Got: %d\n", exp, got);
static
BOOL
compare
(
FLOAT
u
,
FLOAT
v
)
{
return
(
fabs
(
u
-
v
)
<
admitted_error
);
...
...
@@ -101,6 +106,110 @@ static void D3DXBoundProbeTest(void)
ok
(
result
==
FALSE
,
"expected FALSE, received TRUE
\n
"
);
}
static
void
D3DXGetFVFVertexSizeTest
(
void
)
{
UINT
got
;
compare_vertex_sizes
(
D3DFVF_XYZ
,
12
);
compare_vertex_sizes
(
D3DFVF_XYZB3
,
24
);
compare_vertex_sizes
(
D3DFVF_XYZB5
,
32
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_NORMAL
,
24
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_DIFFUSE
,
16
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX1
|
D3DFVF_TEXCOORDSIZE1
(
0
),
16
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX2
|
D3DFVF_TEXCOORDSIZE1
(
0
)
|
D3DFVF_TEXCOORDSIZE1
(
1
),
20
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX1
|
D3DFVF_TEXCOORDSIZE2
(
0
),
20
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX2
|
D3DFVF_TEXCOORDSIZE2
(
0
)
|
D3DFVF_TEXCOORDSIZE2
(
1
),
28
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX6
|
D3DFVF_TEXCOORDSIZE2
(
0
)
|
D3DFVF_TEXCOORDSIZE2
(
1
)
|
D3DFVF_TEXCOORDSIZE2
(
2
)
|
D3DFVF_TEXCOORDSIZE2
(
3
)
|
D3DFVF_TEXCOORDSIZE2
(
4
)
|
D3DFVF_TEXCOORDSIZE2
(
5
),
60
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX8
|
D3DFVF_TEXCOORDSIZE2
(
0
)
|
D3DFVF_TEXCOORDSIZE2
(
1
)
|
D3DFVF_TEXCOORDSIZE2
(
2
)
|
D3DFVF_TEXCOORDSIZE2
(
3
)
|
D3DFVF_TEXCOORDSIZE2
(
4
)
|
D3DFVF_TEXCOORDSIZE2
(
5
)
|
D3DFVF_TEXCOORDSIZE2
(
6
)
|
D3DFVF_TEXCOORDSIZE2
(
7
),
76
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX1
|
D3DFVF_TEXCOORDSIZE3
(
0
),
24
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX4
|
D3DFVF_TEXCOORDSIZE3
(
0
)
|
D3DFVF_TEXCOORDSIZE3
(
1
)
|
D3DFVF_TEXCOORDSIZE3
(
2
)
|
D3DFVF_TEXCOORDSIZE3
(
3
),
60
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX1
|
D3DFVF_TEXCOORDSIZE4
(
0
),
28
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX2
|
D3DFVF_TEXCOORDSIZE4
(
0
)
|
D3DFVF_TEXCOORDSIZE4
(
1
),
44
);
compare_vertex_sizes
(
D3DFVF_XYZ
|
D3DFVF_TEX3
|
D3DFVF_TEXCOORDSIZE4
(
0
)
|
D3DFVF_TEXCOORDSIZE4
(
1
)
|
D3DFVF_TEXCOORDSIZE4
(
2
),
60
);
compare_vertex_sizes
(
D3DFVF_XYZB5
|
D3DFVF_NORMAL
|
D3DFVF_DIFFUSE
|
D3DFVF_SPECULAR
|
D3DFVF_TEX8
|
D3DFVF_TEXCOORDSIZE4
(
0
)
|
D3DFVF_TEXCOORDSIZE4
(
1
)
|
D3DFVF_TEXCOORDSIZE4
(
2
)
|
D3DFVF_TEXCOORDSIZE4
(
3
)
|
D3DFVF_TEXCOORDSIZE4
(
4
)
|
D3DFVF_TEXCOORDSIZE4
(
5
)
|
D3DFVF_TEXCOORDSIZE4
(
6
)
|
D3DFVF_TEXCOORDSIZE4
(
7
),
180
);
}
static
void
D3DXIntersectTriTest
(
void
)
{
BOOL
exp_res
,
got_res
;
...
...
@@ -157,5 +266,6 @@ static void D3DXIntersectTriTest(void)
START_TEST
(
mesh
)
{
D3DXBoundProbeTest
();
D3DXGetFVFVertexSizeTest
();
D3DXIntersectTriTest
();
}
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