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
8689fe32
Commit
8689fe32
authored
Nov 30, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the proper drawable size when setting the scissor rect.
parent
9bc6200e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
state.c
dlls/wined3d/state.c
+6
-10
No files found.
dlls/wined3d/state.c
View file @
8689fe32
...
...
@@ -3668,25 +3668,21 @@ static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContex
static
void
scissorrect
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
RECT
*
pRect
=
&
stateblock
->
scissorRect
;
RECT
windowRect
;
UINT
winHeight
;
windowRect
.
left
=
0
;
windowRect
.
top
=
0
;
windowRect
.
right
=
((
IWineD3DSurfaceImpl
*
)
stateblock
->
wineD3DDevice
->
render_targets
[
0
])
->
currentDesc
.
Width
;
windowRect
.
bottom
=
((
IWineD3DSurfaceImpl
*
)
stateblock
->
wineD3DDevice
->
render_targets
[
0
])
->
currentDesc
.
Height
;
UINT
height
;
UINT
width
;
IWineD3DSurfaceImpl
*
target
=
(
IWineD3DSurfaceImpl
*
)
stateblock
->
wineD3DDevice
->
render_targets
[
0
];
target
->
get_drawable_size
(
target
,
&
width
,
&
height
);
/* Warning: glScissor uses window coordinates, not viewport coordinates, so our viewport correction does not apply
* Warning2: Even in windowed mode the coords are relative to the window, not the screen
*/
winHeight
=
windowRect
.
bottom
-
windowRect
.
top
;
TRACE
(
"(%p) Setting new Scissor Rect to %d:%d-%d:%d
\n
"
,
stateblock
->
wineD3DDevice
,
pRect
->
left
,
pRect
->
bottom
-
winHeight
,
TRACE
(
"(%p) Setting new Scissor Rect to %d:%d-%d:%d
\n
"
,
stateblock
->
wineD3DDevice
,
pRect
->
left
,
pRect
->
bottom
-
height
,
pRect
->
right
-
pRect
->
left
,
pRect
->
bottom
-
pRect
->
top
);
if
(
stateblock
->
wineD3DDevice
->
render_offscreen
)
{
glScissor
(
pRect
->
left
,
pRect
->
top
,
pRect
->
right
-
pRect
->
left
,
pRect
->
bottom
-
pRect
->
top
);
}
else
{
glScissor
(
pRect
->
left
,
winH
eight
-
pRect
->
bottom
,
pRect
->
right
-
pRect
->
left
,
pRect
->
bottom
-
pRect
->
top
);
glScissor
(
pRect
->
left
,
h
eight
-
pRect
->
bottom
,
pRect
->
right
-
pRect
->
left
,
pRect
->
bottom
-
pRect
->
top
);
}
checkGLcall
(
"glScissor"
);
}
...
...
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