Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b6d42244
Commit
b6d42244
authored
Sep 23, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Add a separate function for vertex declaration initialization from an FVF.
parent
f394dfc0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
13 deletions
+27
-13
d3d8_private.h
dlls/d3d8/d3d8_private.h
+2
-3
device.c
dlls/d3d8/device.c
+2
-9
vertexdeclaration.c
dlls/d3d8/vertexdeclaration.c
+23
-1
No files found.
dlls/d3d8/d3d8_private.h
View file @
b6d42244
...
...
@@ -530,9 +530,6 @@ DECLARE_INTERFACE_(IDirect3DVertexDeclaration8, IUnknown)
#define IDirect3DVertexDeclaration8_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DVertexDeclaration8_Release(p) (p)->lpVtbl->Release(p)
/*** Implementation ***/
extern
const
IDirect3DVertexDeclaration8Vtbl
Direct3DVertexDeclaration8_Vtbl
DECLSPEC_HIDDEN
;
typedef
struct
{
const
IDirect3DVertexDeclaration8Vtbl
*
lpVtbl
;
LONG
ref_count
;
...
...
@@ -546,6 +543,8 @@ typedef struct {
HRESULT
vertexdeclaration_init
(
IDirect3DVertexDeclaration8Impl
*
declaration
,
IDirect3DDevice8Impl
*
device
,
const
DWORD
*
elements
)
DECLSPEC_HIDDEN
;
HRESULT
vertexdeclaration_init_fvf
(
IDirect3DVertexDeclaration8Impl
*
declaration
,
IDirect3DDevice8Impl
*
device
,
DWORD
fvf
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* IDirect3DVertexShader8 interface
...
...
dlls/d3d8/device.c
View file @
b6d42244
...
...
@@ -1863,17 +1863,10 @@ static IDirect3DVertexDeclaration8Impl *IDirect3DDevice8Impl_FindDecl(IDirect3DD
return
NULL
;
}
d3d8_declaration
->
ref_count
=
1
;
d3d8_declaration
->
lpVtbl
=
&
Direct3DVertexDeclaration8_Vtbl
;
d3d8_declaration
->
elements
=
NULL
;
d3d8_declaration
->
elements_size
=
0
;
d3d8_declaration
->
shader_handle
=
fvf
;
hr
=
IWineD3DDevice_CreateVertexDeclarationFromFVF
(
This
->
WineD3DDevice
,
&
d3d8_declaration
->
wined3d_vertex_declaration
,
(
IUnknown
*
)
d3d8_declaration
,
fvf
);
hr
=
vertexdeclaration_init_fvf
(
d3d8_declaration
,
This
,
fvf
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to create wined3d vertex declaration.
\n
"
);
WARN
(
"Failed to initialize vertex declaration, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
d3d8_declaration
);
return
NULL
;
}
...
...
dlls/d3d8/vertexdeclaration.c
View file @
b6d42244
...
...
@@ -352,7 +352,7 @@ UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elem
return
element_count
;
}
const
IDirect3DVertexDeclaration8Vtbl
Direct3DVertexDeclaration8_Vtbl
=
static
const
IDirect3DVertexDeclaration8Vtbl
Direct3DVertexDeclaration8_Vtbl
=
{
IDirect3DVertexDeclaration8Impl_QueryInterface
,
IDirect3DVertexDeclaration8Impl_AddRef
,
...
...
@@ -394,3 +394,25 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration8Impl *declaration,
return
D3D_OK
;
}
HRESULT
vertexdeclaration_init_fvf
(
IDirect3DVertexDeclaration8Impl
*
declaration
,
IDirect3DDevice8Impl
*
device
,
DWORD
fvf
)
{
HRESULT
hr
;
declaration
->
ref_count
=
1
;
declaration
->
lpVtbl
=
&
Direct3DVertexDeclaration8_Vtbl
;
declaration
->
elements
=
NULL
;
declaration
->
elements_size
=
0
;
declaration
->
shader_handle
=
fvf
;
hr
=
IWineD3DDevice_CreateVertexDeclarationFromFVF
(
device
->
WineD3DDevice
,
&
declaration
->
wined3d_vertex_declaration
,
(
IUnknown
*
)
declaration
,
fvf
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create wined3d vertex declaration, hr %#x.
\n
"
,
hr
);
return
hr
;
}
return
D3D_OK
;
}
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