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
bf26c2c8
Commit
bf26c2c8
authored
Aug 18, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Add a separate function for material initialization.
parent
c892ed49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
ddraw.c
dlls/ddraw/ddraw.c
+1
-5
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-5
material.c
dlls/ddraw/material.c
+12
-3
No files found.
dlls/ddraw/ddraw.c
View file @
bf26c2c8
...
...
@@ -4432,11 +4432,7 @@ static HRESULT WINAPI d3d3_CreateMaterial(IDirect3D3 *iface, IDirect3DMaterial3
return
DDERR_OUTOFMEMORY
;
}
object
->
lpVtbl
=
&
IDirect3DMaterial3_Vtbl
;
object
->
IDirect3DMaterial2_vtbl
=
&
IDirect3DMaterial2_Vtbl
;
object
->
IDirect3DMaterial_vtbl
=
&
IDirect3DMaterial_Vtbl
;
object
->
ref
=
1
;
object
->
ddraw
=
ddraw_from_d3d3
(
iface
);
d3d_material_init
(
object
,
ddraw_from_d3d3
(
iface
));
TRACE
(
"Created material %p.
\n
"
,
object
);
*
material
=
(
IDirect3DMaterial3
*
)
object
;
...
...
dlls/ddraw/ddraw_private.h
View file @
bf26c2c8
...
...
@@ -548,13 +548,9 @@ struct IDirect3DMaterialImpl
DWORD
Handle
;
};
/* VTables in various versions */
extern
const
IDirect3DMaterialVtbl
IDirect3DMaterial_Vtbl
DECLSPEC_HIDDEN
;
extern
const
IDirect3DMaterial2Vtbl
IDirect3DMaterial2_Vtbl
DECLSPEC_HIDDEN
;
extern
const
IDirect3DMaterial3Vtbl
IDirect3DMaterial3_Vtbl
DECLSPEC_HIDDEN
;
/* Helper functions */
void
material_activate
(
IDirect3DMaterialImpl
*
This
)
DECLSPEC_HIDDEN
;
void
d3d_material_init
(
IDirect3DMaterialImpl
*
material
,
IDirectDrawImpl
*
ddraw
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* IDirect3DViewport - Wraps to D3D7
...
...
dlls/ddraw/material.c
View file @
bf26c2c8
...
...
@@ -448,7 +448,7 @@ void material_activate(IDirect3DMaterialImpl* This)
IDirect3DDevice7_SetMaterial
((
IDirect3DDevice7
*
)
This
->
active_device
,
&
d3d7mat
);
}
const
IDirect3DMaterial3Vtbl
IDirect3DMaterial3_V
tbl
=
static
const
struct
IDirect3DMaterial3Vtbl
d3d_material3_v
tbl
=
{
/*** IUnknown Methods ***/
IDirect3DMaterialImpl_QueryInterface
,
...
...
@@ -460,7 +460,7 @@ const IDirect3DMaterial3Vtbl IDirect3DMaterial3_Vtbl =
IDirect3DMaterialImpl_GetHandle
,
};
const
IDirect3DMaterial2Vtbl
IDirect3DMaterial2_V
tbl
=
static
const
struct
IDirect3DMaterial2Vtbl
d3d_material2_v
tbl
=
{
/*** IUnknown Methods ***/
Thunk_IDirect3DMaterialImpl_2_QueryInterface
,
...
...
@@ -472,7 +472,7 @@ const IDirect3DMaterial2Vtbl IDirect3DMaterial2_Vtbl =
Thunk_IDirect3DMaterialImpl_2_GetHandle
,
};
const
IDirect3DMaterialVtbl
IDirect3DMaterial_V
tbl
=
static
const
struct
IDirect3DMaterialVtbl
d3d_material1_v
tbl
=
{
/*** IUnknown Methods ***/
Thunk_IDirect3DMaterialImpl_1_QueryInterface
,
...
...
@@ -486,3 +486,12 @@ const IDirect3DMaterialVtbl IDirect3DMaterial_Vtbl =
IDirect3DMaterialImpl_Reserve
,
IDirect3DMaterialImpl_Unreserve
};
void
d3d_material_init
(
IDirect3DMaterialImpl
*
material
,
IDirectDrawImpl
*
ddraw
)
{
material
->
lpVtbl
=
&
d3d_material3_vtbl
;
material
->
IDirect3DMaterial2_vtbl
=
&
d3d_material2_vtbl
;
material
->
IDirect3DMaterial_vtbl
=
&
d3d_material1_vtbl
;
material
->
ref
=
1
;
material
->
ddraw
=
ddraw
;
}
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