Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
56c8a82a
Commit
56c8a82a
authored
15 years ago
by
Henri Verbeet
Committed by
Alexandre Julliard
15 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3dx9_36: Implement D3DXGetDeclVertexSize().
parent
dcc490e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
1 addition, 1 deletion
dlls/d3dx9_36/d3dx9_36.spec
dlls/d3dx9_36/mesh.c
+52
-0
52 additions, 0 deletions
dlls/d3dx9_36/mesh.c
include/d3dx9mesh.h
+1
-0
1 addition, 0 deletions
include/d3dx9mesh.h
with
54 additions
and
1 deletion
dlls/d3dx9_36/d3dx9_36.spec
+
1
−
1
View file @
56c8a82a
...
...
@@ -148,7 +148,7 @@
@ stub D3DXGenerateOutputDecl
@ stdcall D3DXGeneratePMesh(ptr ptr ptr ptr long long ptr) d3dx8.D3DXGeneratePMesh
@ stub D3DXGetDeclLength
@ st
ub
D3DXGetDeclVertexSize
@ st
dcall
D3DXGetDeclVertexSize
(ptr long)
@ stdcall D3DXGetDriverLevel(ptr)
@ stdcall D3DXGetFVFVertexSize(long)
@ stdcall D3DXGetImageInfoFromFileA(str ptr)
...
...
This diff is collapsed.
Click to expand it.
dlls/d3dx9_36/mesh.c
+
52
−
0
View file @
56c8a82a
...
...
@@ -19,10 +19,13 @@
*/
#include
"config.h"
#include
"wine/port.h"
#include
"wine/debug.h"
#include
"windef.h"
#include
"wingdi.h"
#include
"d3dx9.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
/*************************************************************************
* D3DXComputeBoundingBox
...
...
@@ -127,6 +130,55 @@ UINT WINAPI D3DXGetFVFVertexSize(DWORD FVF)
return
size
;
}
/*************************************************************************
* D3DXGetFVFVertexSize
*/
UINT
WINAPI
D3DXGetDeclVertexSize
(
const
D3DVERTEXELEMENT9
*
decl
,
DWORD
stream_idx
)
{
const
D3DVERTEXELEMENT9
*
element
;
UINT
size
=
0
;
TRACE
(
"decl %p, stream_idx %u
\n
"
,
decl
,
stream_idx
);
if
(
!
decl
)
return
0
;
for
(
element
=
decl
;
element
->
Stream
!=
0xff
;
++
element
)
{
UINT
type_size
;
if
(
element
->
Stream
!=
stream_idx
)
continue
;
switch
(
element
->
Type
)
{
case
D3DDECLTYPE_FLOAT1
:
type_size
=
1
*
4
;
break
;
case
D3DDECLTYPE_FLOAT2
:
type_size
=
2
*
4
;
break
;
case
D3DDECLTYPE_FLOAT3
:
type_size
=
3
*
4
;
break
;
case
D3DDECLTYPE_FLOAT4
:
type_size
=
4
*
4
;
break
;
case
D3DDECLTYPE_D3DCOLOR
:
type_size
=
4
*
1
;
break
;
case
D3DDECLTYPE_UBYTE4
:
type_size
=
4
*
1
;
break
;
case
D3DDECLTYPE_SHORT2
:
type_size
=
2
*
2
;
break
;
case
D3DDECLTYPE_SHORT4
:
type_size
=
4
*
2
;
break
;
case
D3DDECLTYPE_UBYTE4N
:
type_size
=
4
*
1
;
break
;
case
D3DDECLTYPE_SHORT2N
:
type_size
=
2
*
2
;
break
;
case
D3DDECLTYPE_SHORT4N
:
type_size
=
4
*
2
;
break
;
case
D3DDECLTYPE_USHORT2N
:
type_size
=
2
*
2
;
break
;
case
D3DDECLTYPE_USHORT4N
:
type_size
=
4
*
2
;
break
;
case
D3DDECLTYPE_UDEC3
:
type_size
=
4
;
break
;
/* 3 * 10 bits + 2 padding */
case
D3DDECLTYPE_DEC3N
:
type_size
=
4
;
break
;
case
D3DDECLTYPE_FLOAT16_2
:
type_size
=
2
*
2
;
break
;
case
D3DDECLTYPE_FLOAT16_4
:
type_size
=
4
*
2
;
break
;
default:
FIXME
(
"Unhandled element type %#x, size will be incorrect.
\n
"
,
element
->
Type
);
type_size
=
0
;
break
;
}
if
(
element
->
Offset
+
type_size
>
size
)
size
=
element
->
Offset
+
type_size
;
}
return
size
;
}
/*************************************************************************
* D3DXIntersectTri
*/
...
...
This diff is collapsed.
Click to expand it.
include/d3dx9mesh.h
+
1
−
0
View file @
56c8a82a
...
...
@@ -26,6 +26,7 @@ extern "C" {
#endif
HRESULT
WINAPI
D3DXCreateBuffer
(
DWORD
,
LPD3DXBUFFER
*
);
UINT
WINAPI
D3DXGetDeclVertexSize
(
const
D3DVERTEXELEMENT9
*
decl
,
DWORD
stream_idx
);
UINT
WINAPI
D3DXGetFVFVertexSize
(
DWORD
);
BOOL
WINAPI
D3DXBoxBoundProbe
(
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
);
BOOL
WINAPI
D3DXSphereBoundProbe
(
CONST
D3DXVECTOR3
*
,
FLOAT
,
CONST
D3DXVECTOR3
*
,
CONST
D3DXVECTOR3
*
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment