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
ca469499
Commit
ca469499
authored
Feb 10, 2009
by
David Adam
Committed by
Alexandre Julliard
Feb 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Implement D3DXGetFVFVertexSize.
parent
e5425fc1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletion
+41
-1
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
mesh.c
dlls/d3dx9_36/mesh.c
+39
-0
d3dx9mesh.h
include/d3dx9mesh.h
+1
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
ca469499
...
...
@@ -150,7 +150,7 @@
@ stub D3DXGetDeclLength
@ stub D3DXGetDeclVertexSize
@ stdcall D3DXGetDriverLevel(ptr)
@ st
ub D3DXGetFVFVertexSize
@ st
dcall D3DXGetFVFVertexSize(long)
@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx8.D3DXGetImageInfoFromFileA
@ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx8.D3DXGetImageInfoFromFileInMemory
@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx8.D3DXGetImageInfoFromFileW
...
...
dlls/d3dx9_36/mesh.c
View file @
ca469499
...
...
@@ -89,6 +89,45 @@ HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3* pfirstposition, DWOR
}
/*************************************************************************
* D3DXGetFVFVertexSize
*/
static
UINT
Get_TexCoord_Size_From_FVF
(
DWORD
FVF
,
int
tex_num
)
{
return
(((((
FVF
)
>>
(
16
+
(
2
*
(
tex_num
))))
+
1
)
&
0x03
)
+
1
);
}
UINT
WINAPI
D3DXGetFVFVertexSize
(
DWORD
FVF
)
{
DWORD
size
=
0
;
UINT
i
;
UINT
numTextures
=
(
FVF
&
D3DFVF_TEXCOUNT_MASK
)
>>
D3DFVF_TEXCOUNT_SHIFT
;
if
(
FVF
&
D3DFVF_NORMAL
)
size
+=
sizeof
(
D3DXVECTOR3
);
if
(
FVF
&
D3DFVF_DIFFUSE
)
size
+=
sizeof
(
DWORD
);
if
(
FVF
&
D3DFVF_SPECULAR
)
size
+=
sizeof
(
DWORD
);
if
(
FVF
&
D3DFVF_PSIZE
)
size
+=
sizeof
(
DWORD
);
switch
(
FVF
&
D3DFVF_POSITION_MASK
)
{
case
D3DFVF_XYZ
:
size
+=
sizeof
(
D3DXVECTOR3
);
break
;
case
D3DFVF_XYZRHW
:
size
+=
4
*
sizeof
(
FLOAT
);
break
;
case
D3DFVF_XYZB1
:
size
+=
4
*
sizeof
(
FLOAT
);
break
;
case
D3DFVF_XYZB2
:
size
+=
5
*
sizeof
(
FLOAT
);
break
;
case
D3DFVF_XYZB3
:
size
+=
6
*
sizeof
(
FLOAT
);
break
;
case
D3DFVF_XYZB4
:
size
+=
7
*
sizeof
(
FLOAT
);
break
;
case
D3DFVF_XYZB5
:
size
+=
8
*
sizeof
(
FLOAT
);
break
;
case
D3DFVF_XYZW
:
size
+=
4
*
sizeof
(
FLOAT
);
break
;
}
for
(
i
=
0
;
i
<
numTextures
;
i
++
)
{
size
+=
Get_TexCoord_Size_From_FVF
(
FVF
,
i
)
*
sizeof
(
FLOAT
);
}
return
size
;
}
/*************************************************************************
* D3DXIntersectTri
*/
BOOL
WINAPI
D3DXIntersectTri
(
CONST
D3DXVECTOR3
*
p0
,
CONST
D3DXVECTOR3
*
p1
,
CONST
D3DXVECTOR3
*
p2
,
CONST
D3DXVECTOR3
*
praypos
,
CONST
D3DXVECTOR3
*
praydir
,
FLOAT
*
pu
,
FLOAT
*
pv
,
FLOAT
*
pdist
)
...
...
include/d3dx9mesh.h
View file @
ca469499
...
...
@@ -31,6 +31,7 @@ BOOL WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST
BOOL
WINAPI
D3DXSphereBoundProbe
(
CONST
D3DXVECTOR3
*
,
FLOAT
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
);
HRESULT
WINAPI
D3DXComputeBoundingBox
(
CONST
D3DXVECTOR3
*
,
DWORD
,
DWORD
,
D3DXVECTOR3
*
,
D3DXVECTOR3
*
);
HRESULT
WINAPI
D3DXComputeBoundingSphere
(
CONST
D3DXVECTOR3
*
,
DWORD
,
DWORD
,
D3DXVECTOR3
*
,
FLOAT
*
);
UINT
WINAPI
D3DXGetFVFVertexSize
(
DWORD
);
BOOL
WINAPI
D3DXIntersectTri
(
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
FLOAT
*
,
FLOAT
*
,
FLOAT
*
);
#ifdef __cplusplus
...
...
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