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
575dbfa7
Commit
575dbfa7
authored
May 15, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
May 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Supply the correct box on the screen to be processed during the clear
call, using opengl coordinates, not directx coordinates.
parent
c963e25c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
device.c
dlls/d3d8/device.c
+22
-20
No files found.
dlls/d3d8/device.c
View file @
575dbfa7
...
...
@@ -2088,23 +2088,25 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count
/* Note gl uses lower left, width/height */
TRACE
(
"(%p) %p Rect=(%ld,%ld)->(%ld,%ld) glRect=(%ld,%ld), len=%ld, hei=%ld
\n
"
,
This
,
curRect
,
curRect
->
x1
,
curRect
->
y1
,
curRect
->
x2
,
curRect
->
y2
,
curRect
->
x1
,
curRect
->
y2
,
curRect
->
x2
-
curRect
->
x1
,
curRect
->
y2
-
curRect
->
y1
);
glScissor
(
curRect
->
x1
,
curRect
->
y2
,
curRect
->
x2
-
curRect
->
x1
,
curRect
->
y2
-
curRect
->
y1
);
curRect
->
x1
,
(
This
->
PresentParms
.
BackBufferHeight
-
curRect
->
y2
),
curRect
->
x2
-
curRect
->
x1
,
curRect
->
y2
-
curRect
->
y1
);
glScissor
(
curRect
->
x1
,
(
This
->
PresentParms
.
BackBufferHeight
-
curRect
->
y2
),
curRect
->
x2
-
curRect
->
x1
,
curRect
->
y2
-
curRect
->
y1
);
checkGLcall
(
"glScissor"
);
}
/* Clear the whole screen */
if
(
Flags
&
D3DCLEAR_STENCIL
)
{
glGetIntegerv
(
GL_STENCIL_CLEAR_VALUE
,
&
old_stencil_clear_value
);
glGetIntegerv
(
GL_STENCIL_CLEAR_VALUE
,
&
old_stencil_clear_value
);
glClearStencil
(
Stencil
);
checkGLcall
(
"glClearStencil"
);
glMask
=
glMask
|
GL_STENCIL_BUFFER_BIT
;
}
if
(
Flags
&
D3DCLEAR_ZBUFFER
)
{
glGetBooleanv
(
GL_DEPTH_WRITEMASK
,
&
old_ztest
);
glDepthMask
(
GL_TRUE
);
glGetFloatv
(
GL_DEPTH_CLEAR_VALUE
,
&
old_z_clear_value
);
glGetBooleanv
(
GL_DEPTH_WRITEMASK
,
&
old_ztest
);
glDepthMask
(
GL_TRUE
);
glGetFloatv
(
GL_DEPTH_CLEAR_VALUE
,
&
old_z_clear_value
);
glClearDepth
(
Z
);
checkGLcall
(
"glClearDepth"
);
glMask
=
glMask
|
GL_DEPTH_BUFFER_BIT
;
...
...
@@ -2112,7 +2114,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count
if
(
Flags
&
D3DCLEAR_TARGET
)
{
TRACE
(
"Clearing screen with glClear to color %lx
\n
"
,
Color
);
glGetFloatv
(
GL_COLOR_CLEAR_VALUE
,
old_color_clear_value
);
glGetFloatv
(
GL_COLOR_CLEAR_VALUE
,
old_color_clear_value
);
glClearColor
(((
Color
>>
16
)
&
0xFF
)
/
255
.
0
,
((
Color
>>
8
)
&
0xFF
)
/
255
.
0
,
((
Color
>>
0
)
&
0xFF
)
/
255
.
0
,
...
...
@@ -2124,19 +2126,19 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count
glClear
(
glMask
);
checkGLcall
(
"glClear"
);
if
(
Flags
&
D3DCLEAR_STENCIL
)
{
glClearStencil
(
old_stencil_clear_value
);
}
if
(
Flags
&
D3DCLEAR_ZBUFFER
)
{
glDepthMask
(
old_ztest
);
glClearDepth
(
old_z_clear_value
);
}
if
(
Flags
&
D3DCLEAR_TARGET
)
{
glClearColor
(
old_color_clear_value
[
0
],
old_color_clear_value
[
1
],
old_color_clear_value
[
2
],
old_color_clear_value
[
3
]);
}
if
(
Flags
&
D3DCLEAR_STENCIL
)
{
glClearStencil
(
old_stencil_clear_value
);
}
if
(
Flags
&
D3DCLEAR_ZBUFFER
)
{
glDepthMask
(
old_ztest
);
glClearDepth
(
old_z_clear_value
);
}
if
(
Flags
&
D3DCLEAR_TARGET
)
{
glClearColor
(
old_color_clear_value
[
0
],
old_color_clear_value
[
1
],
old_color_clear_value
[
2
],
old_color_clear_value
[
3
]);
}
if
(
curRect
)
curRect
=
curRect
+
sizeof
(
D3DRECT
);
}
...
...
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