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
90f5be2b
Commit
90f5be2b
authored
Oct 10, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Oct 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Merge MATERIAL types into one type in WINED3D namespace.
parent
70bbf734
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
10 deletions
+24
-10
device.c
dlls/d3d8/device.c
+4
-2
device.c
dlls/d3d9/device.c
+4
-0
device.c
dlls/ddraw/device.c
+6
-2
device.c
dlls/wined3d/device.c
+0
-1
stateblock.c
dlls/wined3d/stateblock.c
+2
-2
wined3d_interface.h
include/wine/wined3d_interface.h
+0
-3
wined3d_types.h
include/wine/wined3d_types.h
+8
-0
No files found.
dlls/d3d8/device.c
View file @
90f5be2b
...
...
@@ -710,14 +710,16 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetViewport(LPDIRECT3DDEVICE8 iface,
static
HRESULT
WINAPI
IDirect3DDevice8Impl_SetMaterial
(
LPDIRECT3DDEVICE8
iface
,
CONST
D3DMATERIAL8
*
pMaterial
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* FIXME: Verify that D3DMATERIAL8 ~= WINED3DMATERIAL */
/* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */
return
IWineD3DDevice_SetMaterial
(
This
->
WineD3DDevice
,
(
const
WINED3DMATERIAL
*
)
pMaterial
);
}
static
HRESULT
WINAPI
IDirect3DDevice8Impl_GetMaterial
(
LPDIRECT3DDEVICE8
iface
,
D3DMATERIAL8
*
pMaterial
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* FIXME: Verify that D3DMATERIAL8 ~= WINED3DMATERIAL */
/* Note: D3DMATERIAL8 is compatible with WINED3DMATERIAL */
return
IWineD3DDevice_GetMaterial
(
This
->
WineD3DDevice
,
(
WINED3DMATERIAL
*
)
pMaterial
);
}
...
...
dlls/d3d9/device.c
View file @
90f5be2b
...
...
@@ -492,12 +492,16 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetViewport(LPDIRECT3DDEVICE9 iface
static
HRESULT
WINAPI
IDirect3DDevice9Impl_SetMaterial
(
LPDIRECT3DDEVICE9
iface
,
CONST
D3DMATERIAL9
*
pMaterial
)
{
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */
return
IWineD3DDevice_SetMaterial
(
This
->
WineD3DDevice
,
(
const
WINED3DMATERIAL
*
)
pMaterial
);
}
static
HRESULT
WINAPI
IDirect3DDevice9Impl_GetMaterial
(
LPDIRECT3DDEVICE9
iface
,
D3DMATERIAL9
*
pMaterial
)
{
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* Note: D3DMATERIAL9 is compatible with WINED3DMATERIAL */
return
IWineD3DDevice_GetMaterial
(
This
->
WineD3DDevice
,
(
WINED3DMATERIAL
*
)
pMaterial
);
}
...
...
dlls/ddraw/device.c
View file @
90f5be2b
...
...
@@ -4095,8 +4095,10 @@ IDirect3DDeviceImpl_7_SetMaterial(IDirect3DDevice7 *iface,
HRESULT
hr
;
TRACE
(
"(%p)->(%p): Relay!
\n
"
,
This
,
Mat
);
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
hr
=
IWineD3DDevice_SetMaterial
(
This
->
wineD3DDevice
,
Mat
);
(
WINED3DMATERIAL
*
)
Mat
);
return
hr_ddraw_from_wined3d
(
hr
);
}
...
...
@@ -4124,8 +4126,10 @@ IDirect3DDeviceImpl_7_GetMaterial(IDirect3DDevice7 *iface,
HRESULT
hr
;
TRACE
(
"(%p)->(%p): Relay!
\n
"
,
This
,
Mat
);
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
hr
=
IWineD3DDevice_GetMaterial
(
This
->
wineD3DDevice
,
Mat
);
(
WINED3DMATERIAL
*
)
Mat
);
return
hr_ddraw_from_wined3d
(
hr
);
}
...
...
dlls/wined3d/device.c
View file @
90f5be2b
...
...
@@ -3139,7 +3139,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetClipStatus(IWineD3DDevice *iface,
/*****
* Get / Set Material
* WARNING: This code relies on the fact that D3DMATERIAL8 == D3DMATERIAL9
*****/
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetMaterial
(
IWineD3DDevice
*
iface
,
CONST
WINED3DMATERIAL
*
pMaterial
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
dlls/wined3d/stateblock.c
View file @
90f5be2b
...
...
@@ -520,9 +520,9 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
if
(
This
->
set
.
material
&&
memcmp
(
&
targetStateBlock
->
material
,
&
This
->
material
,
sizeof
(
D3DMATERIAL9
))
!=
0
)
{
sizeof
(
WINED3DMATERIAL
))
!=
0
)
{
TRACE
(
"Updating material
\n
"
);
memcpy
(
&
This
->
material
,
&
targetStateBlock
->
material
,
sizeof
(
D3DMATERIAL9
));
memcpy
(
&
This
->
material
,
&
targetStateBlock
->
material
,
sizeof
(
WINED3DMATERIAL
));
}
if
(
This
->
set
.
viewport
&&
memcmp
(
&
targetStateBlock
->
viewport
,
...
...
include/wine/wined3d_interface.h
View file @
90f5be2b
...
...
@@ -191,19 +191,16 @@ DEFINE_GUID(IID_IWineD3DQuery,
/* TODO: remove the d3d8/d3d9 dependencies by making a all inclusive WINED3D version */
#if defined( __WINE_D3D9_H )
/* Identical: */
# define WINED3DMATERIAL D3DMATERIAL9
# define WINED3DVIEWPORT D3DVIEWPORT9
# define WINED3DGAMMARAMP D3DGAMMARAMP
#elif defined( __WINE_D3D8_H )
/* Identical: */
# define WINED3DMATERIAL D3DMATERIAL8
# define WINED3DVIEWPORT D3DVIEWPORT8
# define WINED3DGAMMARAMP D3DGAMMARAMP
#else
/* defined (__WINE_D3D_H ) */
/* Identical: */
# define WINED3DMATERIAL D3DMATERIAL7
# define WINED3DVIEWPORT D3DVIEWPORT7
# define WINED3DGAMMARAMP DDGAMMARAMP
...
...
include/wine/wined3d_types.h
View file @
90f5be2b
...
...
@@ -68,6 +68,14 @@ typedef struct _WINED3DLIGHT {
float
Phi
;
}
WINED3DLIGHT
;
typedef
struct
_WINED3DMATERIAL
{
WINED3DCOLORVALUE
Diffuse
;
WINED3DCOLORVALUE
Ambient
;
WINED3DCOLORVALUE
Specular
;
WINED3DCOLORVALUE
Emissive
;
float
Power
;
}
WINED3DMATERIAL
;
#define WINED3D_VSHADER_MAX_CONSTANTS 96
#define WINED3D_PSHADER_MAX_CONSTANTS 32
...
...
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