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
9ce3c61a
Commit
9ce3c61a
authored
Sep 21, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move clip plane state to wined3d_state.
parent
4546a13d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
24 deletions
+27
-24
device.c
dlls/wined3d/device.c
+13
-12
state.c
dlls/wined3d/state.c
+5
-5
stateblock.c
dlls/wined3d/stateblock.c
+8
-6
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/device.c
View file @
9ce3c61a
...
...
@@ -2808,18 +2808,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetClipPlane(IWineD3DDevice *iface, DWO
This
->
updateStateBlock
->
changed
.
clipplane
|=
1
<<
Index
;
if
(
This
->
updateStateBlock
->
clipplane
[
Index
][
0
]
==
pPlane
[
0
]
&&
This
->
updateStateBlock
->
clipplane
[
Index
][
1
]
==
pPlane
[
1
]
&&
This
->
updateStateBlock
->
clipplane
[
Index
][
2
]
==
pPlane
[
2
]
&&
This
->
updateStateBlock
->
clipplane
[
Index
][
3
]
==
pPlane
[
3
])
{
if
(
This
->
updateStateBlock
->
state
.
clip_planes
[
Index
][
0
]
==
pPlane
[
0
]
&&
This
->
updateStateBlock
->
state
.
clip_planes
[
Index
][
1
]
==
pPlane
[
1
]
&&
This
->
updateStateBlock
->
state
.
clip_planes
[
Index
][
2
]
==
pPlane
[
2
]
&&
This
->
updateStateBlock
->
state
.
clip_planes
[
Index
][
3
]
==
pPlane
[
3
])
{
TRACE
(
"Application is setting old values over, nothing to do
\n
"
);
return
WINED3D_OK
;
}
This
->
updateStateBlock
->
clipplane
[
Index
][
0
]
=
pPlane
[
0
];
This
->
updateStateBlock
->
clipplane
[
Index
][
1
]
=
pPlane
[
1
];
This
->
updateStateBlock
->
clipplane
[
Index
][
2
]
=
pPlane
[
2
];
This
->
updateStateBlock
->
clipplane
[
Index
][
3
]
=
pPlane
[
3
];
This
->
updateStateBlock
->
state
.
clip_planes
[
Index
][
0
]
=
pPlane
[
0
];
This
->
updateStateBlock
->
state
.
clip_planes
[
Index
][
1
]
=
pPlane
[
1
];
This
->
updateStateBlock
->
state
.
clip_planes
[
Index
][
2
]
=
pPlane
[
2
];
This
->
updateStateBlock
->
state
.
clip_planes
[
Index
][
3
]
=
pPlane
[
3
];
/* Handle recording of state blocks */
if
(
This
->
isRecordingState
)
{
...
...
@@ -2843,10 +2844,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetClipPlane(IWineD3DDevice *iface, DWO
return
WINED3DERR_INVALIDCALL
;
}
pPlane
[
0
]
=
(
float
)
This
->
stateBlock
->
clipplane
[
Index
][
0
];
pPlane
[
1
]
=
(
float
)
This
->
stateBlock
->
clipplane
[
Index
][
1
];
pPlane
[
2
]
=
(
float
)
This
->
stateBlock
->
clipplane
[
Index
][
2
];
pPlane
[
3
]
=
(
float
)
This
->
stateBlock
->
clipplane
[
Index
][
3
];
pPlane
[
0
]
=
(
float
)
This
->
stateBlock
->
state
.
clip_planes
[
Index
][
0
];
pPlane
[
1
]
=
(
float
)
This
->
stateBlock
->
state
.
clip_planes
[
Index
][
1
];
pPlane
[
2
]
=
(
float
)
This
->
stateBlock
->
state
.
clip_planes
[
Index
][
2
];
pPlane
[
3
]
=
(
float
)
This
->
stateBlock
->
state
.
clip_planes
[
Index
][
3
];
return
WINED3D_OK
;
}
...
...
dlls/wined3d/state.c
View file @
9ce3c61a
...
...
@@ -3809,11 +3809,11 @@ static void clipplane(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wi
}
TRACE
(
"Clipplane [%f,%f,%f,%f]
\n
"
,
stateblock
->
clipplane
[
index
][
0
],
stateblock
->
clipplane
[
index
][
1
],
stateblock
->
clipplane
[
index
][
2
],
stateblock
->
clipplane
[
index
][
3
]);
glClipPlane
(
GL_CLIP_PLANE0
+
index
,
stateblock
->
clipplane
[
index
]);
stateblock
->
state
.
clip_planes
[
index
][
0
],
stateblock
->
state
.
clip_planes
[
index
][
1
],
stateblock
->
state
.
clip_planes
[
index
][
2
],
stateblock
->
state
.
clip_planes
[
index
][
3
]);
glClipPlane
(
GL_CLIP_PLANE0
+
index
,
stateblock
->
state
.
clip_planes
[
index
]);
checkGLcall
(
"glClipPlane"
);
glPopMatrix
();
...
...
dlls/wined3d/stateblock.c
View file @
9ce3c61a
...
...
@@ -818,10 +818,12 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
{
if
(
!
(
map
&
1
))
continue
;
if
(
memcmp
(
targetStateBlock
->
clipplane
[
i
],
This
->
clipplane
[
i
],
sizeof
(
*
This
->
clipplane
)))
if
(
memcmp
(
targetStateBlock
->
state
.
clip_planes
[
i
],
This
->
state
.
clip_planes
[
i
],
sizeof
(
*
This
->
state
.
clip_planes
)))
{
TRACE
(
"Updating clipplane %u.
\n
"
,
i
);
memcpy
(
This
->
clipplane
[
i
],
targetStateBlock
->
clipplane
[
i
],
sizeof
(
*
This
->
clipplane
));
memcpy
(
This
->
state
.
clip_planes
[
i
],
targetStateBlock
->
state
.
clip_planes
[
i
],
sizeof
(
*
This
->
state
.
clip_planes
));
}
}
...
...
@@ -1061,10 +1063,10 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
if
(
!
(
map
&
1
))
continue
;
clip
[
0
]
=
This
->
clipplane
[
i
][
0
];
clip
[
1
]
=
This
->
clipplane
[
i
][
1
];
clip
[
2
]
=
This
->
clipplane
[
i
][
2
];
clip
[
3
]
=
This
->
clipplane
[
i
][
3
];
clip
[
0
]
=
This
->
state
.
clip_planes
[
i
][
0
];
clip
[
1
]
=
This
->
state
.
clip_planes
[
i
][
1
];
clip
[
2
]
=
This
->
state
.
clip_planes
[
i
][
2
];
clip
[
3
]
=
This
->
state
.
clip_planes
[
i
][
3
];
IWineD3DDevice_SetClipPlane
(
device
,
i
,
clip
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
9ce3c61a
...
...
@@ -2374,6 +2374,7 @@ struct wined3d_state
DWORD
lowest_disabled_stage
;
WINED3DMATRIX
transforms
[
HIGHEST_TRANSFORMSTATE
+
1
];
double
clip_planes
[
MAX_CLIPPLANES
][
4
];
WINED3DMATERIAL
material
;
WINED3DVIEWPORT
viewport
;
RECT
scissor_rect
;
...
...
@@ -2402,7 +2403,6 @@ struct IWineD3DStateBlockImpl
struct
wined3d_state
state
;
/* Clipping */
double
clipplane
[
MAX_CLIPPLANES
][
4
];
WINED3DCLIPSTATUS
clip_status
;
/* Contained state management */
...
...
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