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
b1df1d83
Commit
b1df1d83
authored
Oct 31, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Oct 31, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add D3DCLEAR codes to the WINED3D namespace.
parent
de108f65
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
12 deletions
+17
-12
device.c
dlls/wined3d/device.c
+9
-9
surface.c
dlls/wined3d/surface.c
+1
-1
swapchain.c
dlls/wined3d/swapchain.c
+2
-2
wined3d_types.h
include/wine/wined3d_types.h
+5
-0
No files found.
dlls/wined3d/device.c
View file @
b1df1d83
...
...
@@ -2133,7 +2133,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
TRACE
(
"(%p) All defaults now set up, leaving Init3D with %p
\n
"
,
This
,
This
);
/* Clear the screen */
IWineD3DDevice_Clear
((
IWineD3DDevice
*
)
This
,
0
,
NULL
,
D3DCLEAR_STENCIL
|
D3DCLEAR_ZBUFFER
|
D3DCLEAR_TARGET
,
0x00
,
1
.
0
,
0
);
IWineD3DDevice_Clear
((
IWineD3DDevice
*
)
This
,
0
,
NULL
,
WINED3DCLEAR_STENCIL
|
WINED3DCLEAR_ZBUFFER
|
WINE
D3DCLEAR_TARGET
,
0x00
,
1
.
0
,
0
);
This
->
d3d_initialized
=
TRUE
;
return
WINED3D_OK
;
...
...
@@ -6028,8 +6028,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
DWORD
Flags
,
WINED3DCOLOR
Color
,
float
Z
,
DWORD
Stencil
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
/* TODO: From MSDN This method fails if you specify the
D3DCLEAR_ZBUFFER or
D3DCLEAR_STENCIL flags when the
render target does not have an attached depth buffer. Similarly, if you specify the D3DCLEAR_STENCIL flag
/* TODO: From MSDN This method fails if you specify the
WINED3DCLEAR_ZBUFFER or WINE
D3DCLEAR_STENCIL flags when the
render target does not have an attached depth buffer. Similarly, if you specify the
WINE
D3DCLEAR_STENCIL flag
when the depth-buffer format does not contain stencil buffer information, this method fails. */
GLbitfield
glMask
=
0
;
GLboolean
old_ztest
;
...
...
@@ -6054,7 +6054,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
}
/* Only set the values up once, as they are not changing */
if
(
Flags
&
D3DCLEAR_STENCIL
)
{
if
(
Flags
&
WINE
D3DCLEAR_STENCIL
)
{
glGetIntegerv
(
GL_STENCIL_CLEAR_VALUE
,
&
old_stencil_clear_value
);
glClearStencil
(
Stencil
);
checkGLcall
(
"glClearStencil"
);
...
...
@@ -6062,7 +6062,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
glStencilMask
(
0xFFFFFFFF
);
}
if
(
Flags
&
D3DCLEAR_ZBUFFER
)
{
if
(
Flags
&
WINE
D3DCLEAR_ZBUFFER
)
{
glGetBooleanv
(
GL_DEPTH_WRITEMASK
,
&
old_ztest
);
glDepthMask
(
GL_TRUE
);
glGetFloatv
(
GL_DEPTH_CLEAR_VALUE
,
&
old_z_clear_value
);
...
...
@@ -6071,7 +6071,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
glMask
=
glMask
|
GL_DEPTH_BUFFER_BIT
;
}
if
(
Flags
&
D3DCLEAR_TARGET
)
{
if
(
Flags
&
WINE
D3DCLEAR_TARGET
)
{
TRACE
(
"Clearing screen with glClear to color %x
\n
"
,
Color
);
glGetFloatv
(
GL_COLOR_CLEAR_VALUE
,
old_color_clear_value
);
glClearColor
(
D3DCOLOR_R
(
Color
),
...
...
@@ -6115,15 +6115,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
}
/* Restore the old values (why..?) */
if
(
Flags
&
D3DCLEAR_STENCIL
)
{
if
(
Flags
&
WINE
D3DCLEAR_STENCIL
)
{
glClearStencil
(
old_stencil_clear_value
);
glStencilMask
(
This
->
stateBlock
->
renderState
[
WINED3DRS_STENCILWRITEMASK
]);
}
if
(
Flags
&
D3DCLEAR_ZBUFFER
)
{
if
(
Flags
&
WINE
D3DCLEAR_ZBUFFER
)
{
glDepthMask
(
old_ztest
);
glClearDepth
(
old_z_clear_value
);
}
if
(
Flags
&
D3DCLEAR_TARGET
)
{
if
(
Flags
&
WINE
D3DCLEAR_TARGET
)
{
glClearColor
(
old_color_clear_value
[
0
],
old_color_clear_value
[
1
],
old_color_clear_value
[
2
],
...
...
dlls/wined3d/surface.c
View file @
b1df1d83
...
...
@@ -2721,7 +2721,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
IWineD3DDevice_Clear
(
(
IWineD3DDevice
*
)
myDevice
,
1
/* Number of rectangles */
,
&
rect
,
D3DCLEAR_TARGET
,
WINE
D3DCLEAR_TARGET
,
color
,
0
.
0
/* Z */
,
0
/* Stencil */
);
...
...
dlls/wined3d/swapchain.c
View file @
b1df1d83
...
...
@@ -364,12 +364,12 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
TRACE
(
"Clearing
\n
"
);
IWineD3DDevice_Clear
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
,
0
,
NULL
,
D3DCLEAR_STENCIL
|
D3DCLEAR_ZBUFFER
|
D3DCLEAR_TARGET
,
0x00
,
1
.
0
,
0
);
IWineD3DDevice_Clear
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
,
0
,
NULL
,
WINED3DCLEAR_STENCIL
|
WINED3DCLEAR_ZBUFFER
|
WINE
D3DCLEAR_TARGET
,
0x00
,
1
.
0
,
0
);
}
else
{
TRACE
(
"Clearing z/stencil buffer
\n
"
);
IWineD3DDevice_Clear
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
,
0
,
NULL
,
D3DCLEAR_STENCIL
|
D3DCLEAR_ZBUFFER
,
0x00
,
1
.
0
,
0
);
IWineD3DDevice_Clear
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
,
0
,
NULL
,
WINED3DCLEAR_STENCIL
|
WINE
D3DCLEAR_ZBUFFER
,
0x00
,
1
.
0
,
0
);
}
if
(
!
(((
IWineD3DSurfaceImpl
*
)
This
->
frontBuffer
)
->
Flags
&
SFLAG_GLDIRTY
)
||
...
...
include/wine/wined3d_types.h
View file @
b1df1d83
...
...
@@ -1523,4 +1523,9 @@ typedef enum _WINED3DSURFTYPE {
#define WINED3DFVF_TEXCOORDSIZE3(CoordIndex) (WINED3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
#define WINED3DFVF_TEXCOORDSIZE4(CoordIndex) (WINED3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
/* Clear flags */
#define WINED3DCLEAR_TARGET 0x00000001
#define WINED3DCLEAR_ZBUFFER 0x00000002
#define WINED3DCLEAR_STENCIL 0x00000004
#endif
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