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
a1519e62
Commit
a1519e62
authored
May 08, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Map ZBIAS values to a smaller depth range.
parent
7b1e0815
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
device.c
dlls/ddraw/device.c
+4
-2
No files found.
dlls/ddraw/device.c
View file @
a1519e62
...
@@ -2249,6 +2249,8 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_End(IDirect3DDevice2 *iface, DWORD d
...
@@ -2249,6 +2249,8 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_End(IDirect3DDevice2 *iface, DWORD d
* DDERR_INVALIDPARAMS if Value == NULL
* DDERR_INVALIDPARAMS if Value == NULL
*
*
*****************************************************************************/
*****************************************************************************/
static
const
float
zbias_factor
=
-
0
.
000005
f
;
static
HRESULT
static
HRESULT
IDirect3DDeviceImpl_7_GetRenderState
(
IDirect3DDevice7
*
iface
,
IDirect3DDeviceImpl_7_GetRenderState
(
IDirect3DDevice7
*
iface
,
D3DRENDERSTATETYPE
RenderStateType
,
D3DRENDERSTATETYPE
RenderStateType
,
...
@@ -2383,7 +2385,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
...
@@ -2383,7 +2385,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
hr
=
IWineD3DDevice_GetRenderState
(
This
->
wineD3DDevice
,
hr
=
IWineD3DDevice_GetRenderState
(
This
->
wineD3DDevice
,
WINED3DRS_DEPTHBIAS
,
WINED3DRS_DEPTHBIAS
,
&
wined3d_value
.
d
);
&
wined3d_value
.
d
);
if
(
SUCCEEDED
(
hr
))
*
Value
=
-
wined3d_value
.
f
*
16
.
0
f
;
if
(
SUCCEEDED
(
hr
))
*
Value
=
wined3d_value
.
f
/
zbias_factor
;
break
;
break
;
}
}
...
@@ -2708,7 +2710,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
...
@@ -2708,7 +2710,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
DWORD
d
;
DWORD
d
;
float
f
;
float
f
;
}
wined3d_value
;
}
wined3d_value
;
wined3d_value
.
f
=
Value
/
-
16
.
0
;
wined3d_value
.
f
=
Value
*
zbias_factor
;
hr
=
IWineD3DDevice_SetRenderState
(
This
->
wineD3DDevice
,
hr
=
IWineD3DDevice_SetRenderState
(
This
->
wineD3DDevice
,
WINED3DRS_DEPTHBIAS
,
WINED3DRS_DEPTHBIAS
,
wined3d_value
.
d
);
wined3d_value
.
d
);
...
...
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