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
53e78895
Commit
53e78895
authored
Dec 08, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move WINED3DRS_LIGHTNING to the state table.
parent
ae9f68de
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
device.c
dlls/wined3d/device.c
+1
-10
state.c
dlls/wined3d/state.c
+16
-1
No files found.
dlls/wined3d/device.c
View file @
53e78895
...
@@ -3437,17 +3437,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
...
@@ -3437,17 +3437,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
switch
(
State
)
{
switch
(
State
)
{
case
WINED3DRS_FILLMODE
:
case
WINED3DRS_FILLMODE
:
StateTable
[
STATE_RENDER
(
WINED3DRS_FILLMODE
)].
apply
(
STATE_RENDER
(
WINED3DRS_FILLMODE
),
This
->
stateBlock
);
break
;
case
WINED3DRS_LIGHTING
:
case
WINED3DRS_LIGHTING
:
if
(
Value
)
{
StateTable
[
STATE_RENDER
(
State
)].
apply
(
STATE_RENDER
(
State
),
This
->
stateBlock
);
glEnable
(
GL_LIGHTING
);
checkGLcall
(
"glEnable GL_LIGHTING"
);
}
else
{
glDisable
(
GL_LIGHTING
);
checkGLcall
(
"glDisable GL_LIGHTING"
);
}
break
;
break
;
case
WINED3DRS_ZENABLE
:
case
WINED3DRS_ZENABLE
:
...
...
dlls/wined3d/state.c
View file @
53e78895
...
@@ -79,6 +79,21 @@ static void state_fillmode(DWORD state, IWineD3DStateBlockImpl *stateblock) {
...
@@ -79,6 +79,21 @@ static void state_fillmode(DWORD state, IWineD3DStateBlockImpl *stateblock) {
}
}
}
}
static
void
state_lighting
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
)
{
/* TODO: Lighting is only enabled if Vertex normals are passed by the application,
* so merge the lighting render state with the vertex declaration once it is available
*/
if
(
stateblock
->
renderState
[
WINED3DRS_LIGHTING
])
{
glEnable
(
GL_LIGHTING
);
checkGLcall
(
"glEnable GL_LIGHTING"
);
}
else
{
glDisable
(
GL_LIGHTING
);
checkGLcall
(
"glDisable GL_LIGHTING"
);
}
}
const
struct
StateEntry
StateTable
[]
=
const
struct
StateEntry
StateTable
[]
=
{
{
/* State name representative, apply function */
/* State name representative, apply function */
...
@@ -221,7 +236,7 @@ const struct StateEntry StateTable[] =
...
@@ -221,7 +236,7 @@ const struct StateEntry StateTable[] =
{
/*134, WINED3DRS_WRAP6 */
STATE_RENDER
(
WINED3DRS_WRAP0
),
state_unknown
},
{
/*134, WINED3DRS_WRAP6 */
STATE_RENDER
(
WINED3DRS_WRAP0
),
state_unknown
},
{
/*135, WINED3DRS_WRAP7 */
STATE_RENDER
(
WINED3DRS_WRAP0
),
state_unknown
},
{
/*135, WINED3DRS_WRAP7 */
STATE_RENDER
(
WINED3DRS_WRAP0
),
state_unknown
},
{
/*136, WINED3DRS_CLIPPING */
STATE_RENDER
(
WINED3DRS_CLIPPING
),
state_unknown
},
{
/*136, WINED3DRS_CLIPPING */
STATE_RENDER
(
WINED3DRS_CLIPPING
),
state_unknown
},
{
/*137, WINED3DRS_LIGHTING */
STATE_RENDER
(
WINED3DRS_LIGHTING
)
/* Vertex decl! */
,
state_
unknown
},
{
/*137, WINED3DRS_LIGHTING */
STATE_RENDER
(
WINED3DRS_LIGHTING
)
/* Vertex decl! */
,
state_
lighting
},
{
/*138, WINED3DRS_EXTENTS */
STATE_RENDER
(
WINED3DRS_EXTENTS
),
state_unknown
},
{
/*138, WINED3DRS_EXTENTS */
STATE_RENDER
(
WINED3DRS_EXTENTS
),
state_unknown
},
{
/*139, WINED3DRS_AMBIENT */
STATE_RENDER
(
WINED3DRS_AMBIENT
),
state_unknown
},
{
/*139, WINED3DRS_AMBIENT */
STATE_RENDER
(
WINED3DRS_AMBIENT
),
state_unknown
},
{
/*140, WINED3DRS_FOGVERTEXMODE */
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_unknown
},
{
/*140, WINED3DRS_FOGVERTEXMODE */
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
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