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
dd6f5a54
Commit
dd6f5a54
authored
Dec 10, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move WINED3DRS_ZBIAS to the state table.
parent
6a5d7df7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
25 deletions
+29
-25
device.c
dlls/wined3d/device.c
+1
-24
state.c
dlls/wined3d/state.c
+28
-1
No files found.
dlls/wined3d/device.c
View file @
dd6f5a54
...
...
@@ -3390,31 +3390,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case
WINED3DRS_AMBIENTMATERIALSOURCE
:
case
WINED3DRS_EMISSIVEMATERIALSOURCE
:
case
WINED3DRS_LINEPATTERN
:
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
case
WINED3DRS_ZBIAS
:
/* D3D8 only */
{
if
(
Value
)
{
tmpvalue
.
d
=
Value
;
TRACE
(
"ZBias value %f
\n
"
,
tmpvalue
.
f
);
glPolygonOffset
(
0
,
-
tmpvalue
.
f
);
checkGLcall
(
"glPolygonOffset(0, -Value)"
);
glEnable
(
GL_POLYGON_OFFSET_FILL
);
checkGLcall
(
"glEnable(GL_POLYGON_OFFSET_FILL);"
);
glEnable
(
GL_POLYGON_OFFSET_LINE
);
checkGLcall
(
"glEnable(GL_POLYGON_OFFSET_LINE);"
);
glEnable
(
GL_POLYGON_OFFSET_POINT
);
checkGLcall
(
"glEnable(GL_POLYGON_OFFSET_POINT);"
);
}
else
{
glDisable
(
GL_POLYGON_OFFSET_FILL
);
checkGLcall
(
"glDisable(GL_POLYGON_OFFSET_FILL);"
);
glDisable
(
GL_POLYGON_OFFSET_LINE
);
checkGLcall
(
"glDisable(GL_POLYGON_OFFSET_LINE);"
);
glDisable
(
GL_POLYGON_OFFSET_POINT
);
checkGLcall
(
"glDisable(GL_POLYGON_OFFSET_POINT);"
);
}
}
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
break
;
case
WINED3DRS_NORMALIZENORMALS
:
...
...
dlls/wined3d/state.c
View file @
dd6f5a54
...
...
@@ -869,6 +869,33 @@ static void state_linepattern(DWORD state, IWineD3DStateBlockImpl *stateblock) {
}
}
static
void
state_zbias
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
union
{
DWORD
d
;
float
f
;
}
tmpvalue
;
if
(
stateblock
->
renderState
[
WINED3DRS_ZBIAS
])
{
tmpvalue
.
d
=
stateblock
->
renderState
[
WINED3DRS_ZBIAS
];
TRACE
(
"ZBias value %f
\n
"
,
tmpvalue
.
f
);
glPolygonOffset
(
0
,
-
tmpvalue
.
f
);
checkGLcall
(
"glPolygonOffset(0, -Value)"
);
glEnable
(
GL_POLYGON_OFFSET_FILL
);
checkGLcall
(
"glEnable(GL_POLYGON_OFFSET_FILL);"
);
glEnable
(
GL_POLYGON_OFFSET_LINE
);
checkGLcall
(
"glEnable(GL_POLYGON_OFFSET_LINE);"
);
glEnable
(
GL_POLYGON_OFFSET_POINT
);
checkGLcall
(
"glEnable(GL_POLYGON_OFFSET_POINT);"
);
}
else
{
glDisable
(
GL_POLYGON_OFFSET_FILL
);
checkGLcall
(
"glDisable(GL_POLYGON_OFFSET_FILL);"
);
glDisable
(
GL_POLYGON_OFFSET_LINE
);
checkGLcall
(
"glDisable(GL_POLYGON_OFFSET_LINE);"
);
glDisable
(
GL_POLYGON_OFFSET_POINT
);
checkGLcall
(
"glDisable(GL_POLYGON_OFFSET_POINT);"
);
}
}
const
struct
StateEntry
StateTable
[]
=
{
/* State name representative, apply function */
...
...
@@ -919,7 +946,7 @@ const struct StateEntry StateTable[] =
{
/* 44, WINED3DRS_TEXTUREADDRESSU */
0
,
/* Handled in ddraw */
state_undefined
},
{
/* 45, WINED3DRS_TEXTUREADDRESSV */
0
,
/* Handled in ddraw */
state_undefined
},
{
/* 46, WINED3DRS_MIPMAPLODBIAS */
STATE_RENDER
(
WINED3DRS_MIPMAPLODBIAS
),
state_unknown
},
{
/* 47, WINED3DRS_ZBIAS */
STATE_RENDER
(
WINED3DRS_ZBIAS
),
state_
unknown
},
{
/* 47, WINED3DRS_ZBIAS */
STATE_RENDER
(
WINED3DRS_ZBIAS
),
state_
zbias
},
{
/* 48, WINED3DRS_RANGEFOGENABLE */
0
,
state_nogl
},
{
/* 49, WINED3DRS_ANISOTROPY */
STATE_RENDER
(
WINED3DRS_ANISOTROPY
),
state_unknown
},
{
/* 50, WINED3DRS_FLUSHBATCH */
STATE_RENDER
(
WINED3DRS_FLUSHBATCH
),
state_unknown
},
...
...
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