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
d93e161b
Commit
d93e161b
authored
Apr 28, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d: Move clippers from DDraw to wined3d.
parent
04fada90
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
340 additions
and
62 deletions
+340
-62
clipper.c
dlls/ddraw/clipper.c
+22
-54
ddraw.c
dlls/ddraw/ddraw.c
+6
-2
ddraw_private.h
dlls/ddraw/ddraw_private.h
+5
-6
main.c
dlls/ddraw/main.c
+3
-0
Makefile.in
dlls/wined3d/Makefile.in
+1
-0
clipper.c
dlls/wined3d/clipper.c
+203
-0
surface.c
dlls/wined3d/surface.c
+21
-0
surface_gdi.c
dlls/wined3d/surface_gdi.c
+2
-0
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+18
-0
wined3d_interface.h
include/wine/wined3d_interface.h
+58
-0
No files found.
dlls/ddraw/clipper.c
View file @
d93e161b
...
@@ -106,8 +106,9 @@ static ULONG WINAPI IDirectDrawClipperImpl_Release(IDirectDrawClipper *iface) {
...
@@ -106,8 +106,9 @@ static ULONG WINAPI IDirectDrawClipperImpl_Release(IDirectDrawClipper *iface) {
if
(
ref
==
0
)
if
(
ref
==
0
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
IWineD3DClipper_Release
(
This
->
wineD3DClipper
);
return
0
;
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
}
else
return
ref
;
else
return
ref
;
}
}
...
@@ -131,15 +132,17 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetHwnd(
...
@@ -131,15 +132,17 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetHwnd(
LPDIRECTDRAWCLIPPER
iface
,
DWORD
dwFlags
,
HWND
hWnd
LPDIRECTDRAWCLIPPER
iface
,
DWORD
dwFlags
,
HWND
hWnd
)
{
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
HRESULT
hr
;
TRACE
(
"(%p)->(%08x,%p)
\n
"
,
This
,
dwFlags
,
hWnd
);
TRACE
(
"(%p)->(0x%08x,0x%08x)
\n
"
,
This
,
dwFlags
,
(
DWORD
)
hWnd
);
hr
=
IWineD3DClipper_SetHWnd
(
This
->
wineD3DClipper
,
if
(
dwFlags
)
{
dwFlags
,
FIXME
(
"dwFlags = 0x%08x, not supported.
\n
"
,
dwFlags
);
hWnd
);
return
DDERR_INVALIDPARAMS
;
switch
(
hr
)
{
case
WINED3DERR_INVALIDCALL
:
return
DDERR_INVALIDPARAMS
;
default:
return
hr
;
}
}
This
->
hWnd
=
hWnd
;
return
DD_OK
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -165,46 +168,12 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetClipList(
...
@@ -165,46 +168,12 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetClipList(
LPDWORD
lpdwSize
)
LPDWORD
lpdwSize
)
{
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
This
,
lpRect
,
lpClipList
,
lpdwSize
);
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
This
,
lpRect
,
lpClipList
,
lpdwSize
);
if
(
This
->
hWnd
)
return
IWineD3DClipper_GetClipList
(
This
->
wineD3DClipper
,
{
lpRect
,
HDC
hDC
=
GetDCEx
(
This
->
hWnd
,
NULL
,
DCX_WINDOW
);
lpClipList
,
if
(
hDC
)
lpdwSize
);
{
HRGN
hRgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
GetRandomRgn
(
hDC
,
hRgn
,
SYSRGN
))
{
if
(
GetVersion
()
&
0x80000000
)
{
/* map region to screen coordinates */
POINT
org
;
GetDCOrgEx
(
hDC
,
&
org
);
OffsetRgn
(
hRgn
,
org
.
x
,
org
.
y
);
}
if
(
lpRect
)
{
HRGN
hRgnClip
=
CreateRectRgn
(
lpRect
->
left
,
lpRect
->
top
,
lpRect
->
right
,
lpRect
->
bottom
);
CombineRgn
(
hRgn
,
hRgn
,
hRgnClip
,
RGN_AND
);
DeleteObject
(
hRgnClip
);
}
*
lpdwSize
=
GetRegionData
(
hRgn
,
*
lpdwSize
,
lpClipList
);
}
DeleteObject
(
hRgn
);
ReleaseDC
(
This
->
hWnd
,
hDC
);
}
return
DD_OK
;
}
else
{
static
int
warned
=
0
;
if
(
warned
++
<
10
)
FIXME
(
"(%p,%p,%p,%p),stub!
\n
"
,
This
,
lpRect
,
lpClipList
,
lpdwSize
);
if
(
lpdwSize
)
*
lpdwSize
=
0
;
return
DDERR_NOCLIPLIST
;
}
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -225,10 +194,10 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetClipList(
...
@@ -225,10 +194,10 @@ static HRESULT WINAPI IDirectDrawClipperImpl_SetClipList(
LPDIRECTDRAWCLIPPER
iface
,
LPRGNDATA
lprgn
,
DWORD
dwFlag
LPDIRECTDRAWCLIPPER
iface
,
LPRGNDATA
lprgn
,
DWORD
dwFlag
)
{
)
{
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
static
int
warned
=
0
;
if
(
warned
++
<
10
||
lprgn
==
NULL
)
return
IWineD3DClipper_SetClipList
(
This
->
wineD3DClipper
,
FIXME
(
"(%p,%p,%d),stub!
\n
"
,
This
,
lprgn
,
dwFlag
);
lprgn
,
return
DD_OK
;
dwFlag
)
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -248,9 +217,8 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetHWnd(
...
@@ -248,9 +217,8 @@ static HRESULT WINAPI IDirectDrawClipperImpl_GetHWnd(
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
IDirectDrawClipperImpl
*
This
=
(
IDirectDrawClipperImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
hWndPtr
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
hWndPtr
);
*
hWndPtr
=
This
->
hWnd
;
return
IWineD3DClipper_GetHWnd
(
This
->
wineD3DClipper
,
hWndPtr
);
return
DD_OK
;
}
}
/*****************************************************************************
/*****************************************************************************
...
...
dlls/ddraw/ddraw.c
View file @
d93e161b
...
@@ -3037,8 +3037,12 @@ DirectDrawCreateClipper(DWORD Flags,
...
@@ -3037,8 +3037,12 @@ DirectDrawCreateClipper(DWORD Flags,
ICOM_INIT_INTERFACE
(
object
,
IDirectDrawClipper
,
IDirectDrawClipper_Vtbl
);
ICOM_INIT_INTERFACE
(
object
,
IDirectDrawClipper
,
IDirectDrawClipper_Vtbl
);
object
->
ref
=
1
;
object
->
ref
=
1
;
object
->
hWnd
=
0
;
object
->
wineD3DClipper
=
pWineDirect3DCreateClipper
((
IUnknown
*
)
object
);
object
->
ddraw_owner
=
NULL
;
if
(
!
object
->
wineD3DClipper
)
{
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
E_OUTOFMEMORY
;
}
*
Clipper
=
(
IDirectDrawClipper
*
)
object
;
*
Clipper
=
(
IDirectDrawClipper
*
)
object
;
return
DD_OK
;
return
DD_OK
;
...
...
dlls/ddraw/ddraw_private.h
View file @
d93e161b
...
@@ -398,16 +398,15 @@ struct IDirectDrawClipperImpl
...
@@ -398,16 +398,15 @@ struct IDirectDrawClipperImpl
ICOM_VFIELD_MULTI
(
IDirectDrawClipper
);
ICOM_VFIELD_MULTI
(
IDirectDrawClipper
);
LONG
ref
;
LONG
ref
;
/* IDirectDrawClipper fields */
IWineD3DClipper
*
wineD3DClipper
;
HWND
hWnd
;
IDirectDrawImpl
*
ddraw_owner
;
IDirectDrawImpl
*
ddraw_owner
;
struct
IDirectDrawClipperImpl
*
prev_ddraw
;
struct
IDirectDrawClipperImpl
*
next_ddraw
;
};
};
const
IDirectDrawClipperVtbl
IDirectDrawClipper_Vtbl
;
const
IDirectDrawClipperVtbl
IDirectDrawClipper_Vtbl
;
typedef
IWineD3DClipper
*
(
WINAPI
*
fnWineDirect3DCreateClipper
)(
IUnknown
*
);
fnWineDirect3DCreateClipper
pWineDirect3DCreateClipper
;
/*****************************************************************************
/*****************************************************************************
* IDirectDrawPalette implementation structure
* IDirectDrawPalette implementation structure
*****************************************************************************/
*****************************************************************************/
...
...
dlls/ddraw/main.c
View file @
d93e161b
...
@@ -172,7 +172,10 @@ DDRAW_Create(const GUID *guid,
...
@@ -172,7 +172,10 @@ DDRAW_Create(const GUID *guid,
{
{
hWineD3D
=
LoadLibraryA
(
"wined3d"
);
hWineD3D
=
LoadLibraryA
(
"wined3d"
);
if
(
hWineD3D
)
if
(
hWineD3D
)
{
pWineDirect3DCreate
=
(
fnWineDirect3DCreate
)
GetProcAddress
(
hWineD3D
,
"WineDirect3DCreate"
);
pWineDirect3DCreate
=
(
fnWineDirect3DCreate
)
GetProcAddress
(
hWineD3D
,
"WineDirect3DCreate"
);
pWineDirect3DCreateClipper
=
(
fnWineDirect3DCreateClipper
)
GetProcAddress
(
hWineD3D
,
"WineDirect3DCreateClipper"
);
}
}
}
if
(
!
hWineD3D
)
if
(
!
hWineD3D
)
...
...
dlls/wined3d/Makefile.in
View file @
d93e161b
...
@@ -12,6 +12,7 @@ C_SRCS = \
...
@@ -12,6 +12,7 @@ C_SRCS = \
arb_program_shader.c
\
arb_program_shader.c
\
baseshader.c
\
baseshader.c
\
basetexture.c
\
basetexture.c
\
clipper.c
\
context.c
\
context.c
\
cubetexture.c
\
cubetexture.c
\
device.c
\
device.c
\
...
...
dlls/wined3d/clipper.c
0 → 100644
View file @
d93e161b
/* IWineD3DClipper implementation
*
* Copyright 2000 (c) Marcus Meissner
* Copyright 2000 (c) TransGaming Technologies Inc.
* Copyright 2006 (c) Stefan Dsinger
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdio.h>
#ifdef HAVE_FLOAT_H
# include <float.h>
#endif
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
static
HRESULT
WINAPI
IWineD3DClipperImpl_QueryInterface
(
IWineD3DClipper
*
iface
,
REFIID
riid
,
void
**
Obj
)
{
IWineD3DClipperImpl
*
This
=
(
IWineD3DClipperImpl
*
)
iface
;
TRACE
(
"(%p)->(%p,%p)
\n
"
,
This
,
riid
,
Obj
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
&
IID_IWineD3DClipper
,
riid
))
{
*
Obj
=
iface
;
IWineD3DClipper_AddRef
(
iface
);
return
S_OK
;
}
else
{
return
E_NOINTERFACE
;
}
}
static
ULONG
WINAPI
IWineD3DClipperImpl_AddRef
(
IWineD3DClipper
*
iface
)
{
IWineD3DClipperImpl
*
This
=
(
IWineD3DClipperImpl
*
)
iface
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->() incrementing from %u.
\n
"
,
This
,
ref
-
1
);
return
ref
;
}
static
ULONG
WINAPI
IWineD3DClipperImpl_Release
(
IWineD3DClipper
*
iface
)
{
IWineD3DClipperImpl
*
This
=
(
IWineD3DClipperImpl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->() decrementing from %u.
\n
"
,
This
,
ref
+
1
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
else
return
ref
;
}
static
HRESULT
WINAPI
IWineD3DClipperImpl_GetParent
(
IWineD3DClipper
*
iface
,
IUnknown
**
Parent
)
{
IWineD3DClipperImpl
*
This
=
(
IWineD3DClipperImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
Parent
);
*
Parent
=
This
->
Parent
;
IUnknown_AddRef
(
*
Parent
);
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DClipperImpl_SetHwnd
(
IWineD3DClipper
*
iface
,
DWORD
Flags
,
HWND
hWnd
)
{
IWineD3DClipperImpl
*
This
=
(
IWineD3DClipperImpl
*
)
iface
;
TRACE
(
"(%p)->(0x%08x,%p)
\n
"
,
This
,
Flags
,
hWnd
);
if
(
Flags
)
{
FIXME
(
"Flags = 0x%08x, not supported.
\n
"
,
Flags
);
return
WINED3DERR_INVALIDCALL
;
}
This
->
hWnd
=
hWnd
;
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DClipperImpl_GetClipList
(
IWineD3DClipper
*
iface
,
RECT
*
Rect
,
RGNDATA
*
ClipList
,
DWORD
*
Size
)
{
IWineD3DClipperImpl
*
This
=
(
IWineD3DClipperImpl
*
)
iface
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
This
,
Rect
,
ClipList
,
Size
);
if
(
This
->
hWnd
)
{
HDC
hDC
=
GetDCEx
(
This
->
hWnd
,
NULL
,
DCX_WINDOW
);
if
(
hDC
)
{
HRGN
hRgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
GetRandomRgn
(
hDC
,
hRgn
,
SYSRGN
))
{
if
(
GetVersion
()
&
0x80000000
)
{
/* map region to screen coordinates */
POINT
org
;
GetDCOrgEx
(
hDC
,
&
org
);
OffsetRgn
(
hRgn
,
org
.
x
,
org
.
y
);
}
if
(
Rect
)
{
HRGN
hRgnClip
=
CreateRectRgn
(
Rect
->
left
,
Rect
->
top
,
Rect
->
right
,
Rect
->
bottom
);
CombineRgn
(
hRgn
,
hRgn
,
hRgnClip
,
RGN_AND
);
DeleteObject
(
hRgnClip
);
}
*
Size
=
GetRegionData
(
hRgn
,
*
Size
,
ClipList
);
}
DeleteObject
(
hRgn
);
ReleaseDC
(
This
->
hWnd
,
hDC
);
}
return
WINED3D_OK
;
}
else
{
static
int
warned
=
0
;
if
(
warned
++
<
10
)
FIXME
(
"(%p,%p,%p,%p),stub!
\n
"
,
This
,
Rect
,
ClipList
,
Size
);
if
(
Size
)
*
Size
=
0
;
return
WINEDDERR_NOCLIPLIST
;
}
}
static
HRESULT
WINAPI
IWineD3DClipperImpl_SetClipList
(
IWineD3DClipper
*
iface
,
RGNDATA
*
rgn
,
DWORD
Flags
)
{
IWineD3DClipperImpl
*
This
=
(
IWineD3DClipperImpl
*
)
iface
;
static
int
warned
=
0
;
if
(
warned
++
<
10
||
rgn
==
NULL
)
FIXME
(
"(%p,%p,%d),stub!
\n
"
,
This
,
rgn
,
Flags
);
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DClipperImpl_GetHwnd
(
IWineD3DClipper
*
iface
,
HWND
*
hwnd
)
{
IWineD3DClipperImpl
*
This
=
(
IWineD3DClipperImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
hwnd
);
*
hwnd
=
This
->
hWnd
;
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DClipperImpl_IsClipListChanged
(
IWineD3DClipper
*
iface
,
BOOL
*
changed
)
{
IWineD3DClipperImpl
*
This
=
(
IWineD3DClipperImpl
*
)
iface
;
FIXME
(
"(%p)->(%p),stub!
\n
"
,
This
,
changed
);
/* XXX What is safest? */
*
changed
=
FALSE
;
return
WINED3D_OK
;
}
static
const
IWineD3DClipperVtbl
IWineD3DClipper_Vtbl
=
{
IWineD3DClipperImpl_QueryInterface
,
IWineD3DClipperImpl_AddRef
,
IWineD3DClipperImpl_Release
,
IWineD3DClipperImpl_GetParent
,
IWineD3DClipperImpl_GetClipList
,
IWineD3DClipperImpl_GetHwnd
,
IWineD3DClipperImpl_IsClipListChanged
,
IWineD3DClipperImpl_SetClipList
,
IWineD3DClipperImpl_SetHwnd
};
IWineD3DClipper
*
WINAPI
WineDirect3DCreateClipper
(
IUnknown
*
Parent
)
{
IWineD3DClipperImpl
*
obj
;
TRACE
(
"Creating clipper, parent %p
\n
"
,
Parent
);
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
obj
));
if
(
!
obj
)
{
ERR
(
"Out of memory when trying to allocate a WineD3D Clipper
\n
"
);
return
NULL
;
}
obj
->
lpVtbl
=
&
IWineD3DClipper_Vtbl
;
obj
->
Parent
=
Parent
;
IWineD3DClipper_AddRef
((
IWineD3DClipper
*
)
obj
);
return
(
IWineD3DClipper
*
)
obj
;
}
dlls/wined3d/surface.c
View file @
d93e161b
...
@@ -3419,6 +3419,25 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, RECT *S
...
@@ -3419,6 +3419,25 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, RECT *S
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetClipper
(
IWineD3DSurface
*
iface
,
IWineD3DClipper
*
clipper
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
clipper
);
This
->
clipper
=
clipper
;
return
WINED3D_OK
;
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetClipper
(
IWineD3DSurface
*
iface
,
IWineD3DClipper
**
clipper
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
clipper
);
*
clipper
=
This
->
clipper
;
IWineD3DClipper_AddRef
(
*
clipper
);
return
WINED3D_OK
;
}
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
=
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
=
{
{
/* IUnknown */
/* IUnknown */
...
@@ -3459,6 +3478,8 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
...
@@ -3459,6 +3478,8 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
IWineD3DSurfaceImpl_GetOverlayPosition
,
IWineD3DSurfaceImpl_GetOverlayPosition
,
IWineD3DSurfaceImpl_UpdateOverlayZOrder
,
IWineD3DSurfaceImpl_UpdateOverlayZOrder
,
IWineD3DSurfaceImpl_UpdateOverlay
,
IWineD3DSurfaceImpl_UpdateOverlay
,
IWineD3DSurfaceImpl_SetClipper
,
IWineD3DSurfaceImpl_GetClipper
,
/* Internal use: */
/* Internal use: */
IWineD3DSurfaceImpl_AddDirtyRect
,
IWineD3DSurfaceImpl_AddDirtyRect
,
IWineD3DSurfaceImpl_LoadTexture
,
IWineD3DSurfaceImpl_LoadTexture
,
...
...
dlls/wined3d/surface_gdi.c
View file @
d93e161b
...
@@ -1589,6 +1589,8 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
...
@@ -1589,6 +1589,8 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineD3DSurfaceImpl_GetOverlayPosition
,
IWineD3DSurfaceImpl_GetOverlayPosition
,
IWineD3DSurfaceImpl_UpdateOverlayZOrder
,
IWineD3DSurfaceImpl_UpdateOverlayZOrder
,
IWineD3DSurfaceImpl_UpdateOverlay
,
IWineD3DSurfaceImpl_UpdateOverlay
,
IWineD3DSurfaceImpl_SetClipper
,
IWineD3DSurfaceImpl_GetClipper
,
/* Internal use: */
/* Internal use: */
IWineD3DSurfaceImpl_AddDirtyRect
,
IWineD3DSurfaceImpl_AddDirtyRect
,
IWineGDISurfaceImpl_LoadTexture
,
IWineGDISurfaceImpl_LoadTexture
,
...
...
dlls/wined3d/wined3d.spec
View file @
d93e161b
@ stdcall WineDirect3DCreate(long long ptr)
@ stdcall WineDirect3DCreate(long long ptr)
@ stdcall WineDirect3DCreateClipper(ptr)
dlls/wined3d/wined3d_private.h
View file @
d93e161b
...
@@ -1011,6 +1011,19 @@ typedef struct {
...
@@ -1011,6 +1011,19 @@ typedef struct {
}
renderbuffer_entry_t
;
}
renderbuffer_entry_t
;
/*****************************************************************************
/*****************************************************************************
* IWineD3DClipp implementation structure
*/
typedef
struct
IWineD3DClipperImpl
{
const
IWineD3DClipperVtbl
*
lpVtbl
;
LONG
ref
;
IUnknown
*
Parent
;
HWND
hWnd
;
}
IWineD3DClipperImpl
;
/*****************************************************************************
* IWineD3DSurface implementation structure
* IWineD3DSurface implementation structure
*/
*/
struct
IWineD3DSurfaceImpl
struct
IWineD3DSurfaceImpl
...
@@ -1064,6 +1077,9 @@ struct IWineD3DSurfaceImpl
...
@@ -1064,6 +1077,9 @@ struct IWineD3DSurfaceImpl
struct
list
renderbuffers
;
struct
list
renderbuffers
;
renderbuffer_entry_t
*
current_renderbuffer
;
renderbuffer_entry_t
*
current_renderbuffer
;
/* DirectDraw clippers */
IWineD3DClipper
*
clipper
;
};
};
extern
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
;
extern
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
;
...
@@ -1111,6 +1127,8 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LO
...
@@ -1111,6 +1127,8 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LO
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetOverlayPosition
(
IWineD3DSurface
*
iface
,
LONG
*
X
,
LONG
*
Y
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetOverlayPosition
(
IWineD3DSurface
*
iface
,
LONG
*
X
,
LONG
*
Y
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_UpdateOverlayZOrder
(
IWineD3DSurface
*
iface
,
DWORD
Flags
,
IWineD3DSurface
*
Ref
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_UpdateOverlayZOrder
(
IWineD3DSurface
*
iface
,
DWORD
Flags
,
IWineD3DSurface
*
Ref
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_UpdateOverlay
(
IWineD3DSurface
*
iface
,
RECT
*
SrcRect
,
IWineD3DSurface
*
DstSurface
,
RECT
*
DstRect
,
DWORD
Flags
,
WINEDDOVERLAYFX
*
FX
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_UpdateOverlay
(
IWineD3DSurface
*
iface
,
RECT
*
SrcRect
,
IWineD3DSurface
*
DstSurface
,
RECT
*
DstRect
,
DWORD
Flags
,
WINEDDOVERLAYFX
*
FX
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetClipper
(
IWineD3DSurface
*
iface
,
IWineD3DClipper
*
clipper
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetClipper
(
IWineD3DSurface
*
iface
,
IWineD3DClipper
**
clipper
);
/* Surface flags: */
/* Surface flags: */
#define SFLAG_OVERSIZE 0x00000001
/* Surface is bigger than gl size, blts only */
#define SFLAG_OVERSIZE 0x00000001
/* Surface is bigger than gl size, blts only */
...
...
include/wine/wined3d_interface.h
View file @
d93e161b
...
@@ -79,6 +79,7 @@ struct IWineD3DSurface;
...
@@ -79,6 +79,7 @@ struct IWineD3DSurface;
#define WINEDDERR_NOTFLIPPABLE MAKE_WINED3DHRESULT(582)
#define WINEDDERR_NOTFLIPPABLE MAKE_WINED3DHRESULT(582)
#define WINEDDERR_SURFACEBUSY MAKE_WINED3DHRESULT(430)
#define WINEDDERR_SURFACEBUSY MAKE_WINED3DHRESULT(430)
#define WINEDDERR_INVALIDRECT MAKE_WINED3DHRESULT(150)
#define WINEDDERR_INVALIDRECT MAKE_WINED3DHRESULT(150)
#define WINEDDERR_NOCLIPLIST MAKE_WINED3DHRESULT(205)
#define WINED3DOK_NOAUTOGEN MAKE_WINED3DSTATUS(2159)
#define WINED3DOK_NOAUTOGEN MAKE_WINED3DSTATUS(2159)
/*****************************************************************************
/*****************************************************************************
...
@@ -104,6 +105,7 @@ struct IWineD3DVertexShader;
...
@@ -104,6 +105,7 @@ struct IWineD3DVertexShader;
struct
IWineD3DPixelShader
;
struct
IWineD3DPixelShader
;
struct
IWineD3DQuery
;
struct
IWineD3DQuery
;
struct
IWineD3DSwapChain
;
struct
IWineD3DSwapChain
;
struct
IWineD3DClipper
;
/* {108F9C44-6F30-11d9-C687-00046142C14F} */
/* {108F9C44-6F30-11d9-C687-00046142C14F} */
...
@@ -187,6 +189,10 @@ DEFINE_GUID(IID_IWineD3DStateBlock,
...
@@ -187,6 +189,10 @@ DEFINE_GUID(IID_IWineD3DStateBlock,
DEFINE_GUID
(
IID_IWineD3DQuery
,
DEFINE_GUID
(
IID_IWineD3DQuery
,
0x905ddbac
,
0x6f30
,
0x11d9
,
0xc6
,
0x87
,
0x0
,
0x4
,
0x61
,
0x42
,
0xc1
,
0x4f
);
0x905ddbac
,
0x6f30
,
0x11d9
,
0xc6
,
0x87
,
0x0
,
0x4
,
0x61
,
0x42
,
0xc1
,
0x4f
);
/* {8f2bceb1-d338-488c-ab7f-0ec980bf5d2d} */
DEFINE_GUID
(
IID_IWineD3DClipper
,
0x8f2bceb1
,
0xd338
,
0x488c
,
0xab
,
0x7f
,
0x0e
,
0xc9
,
0x80
,
0xbf
,
0x5d
,
0x2d
);
/*****************************************************************************
/*****************************************************************************
* Callback functions required for predefining surfaces / stencils
* Callback functions required for predefining surfaces / stencils
*/
*/
...
@@ -1119,6 +1125,8 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
...
@@ -1119,6 +1125,8 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
STDMETHOD
(
GetOverlayPosition
)(
THIS_
LONG
*
X
,
LONG
*
Y
)
PURE
;
STDMETHOD
(
GetOverlayPosition
)(
THIS_
LONG
*
X
,
LONG
*
Y
)
PURE
;
STDMETHOD
(
UpdateOverlayZOrder
)(
THIS_
DWORD
Flags
,
IWineD3DSurface
*
Ref
)
PURE
;
STDMETHOD
(
UpdateOverlayZOrder
)(
THIS_
DWORD
Flags
,
IWineD3DSurface
*
Ref
)
PURE
;
STDMETHOD
(
UpdateOverlay
)(
THIS_
RECT
*
SrcRect
,
IWineD3DSurface
*
DstSurface
,
RECT
*
DstRect
,
DWORD
Flags
,
WINEDDOVERLAYFX
*
FX
);
STDMETHOD
(
UpdateOverlay
)(
THIS_
RECT
*
SrcRect
,
IWineD3DSurface
*
DstSurface
,
RECT
*
DstRect
,
DWORD
Flags
,
WINEDDOVERLAYFX
*
FX
);
STDMETHOD
(
SetClipper
)(
THIS_
struct
IWineD3DClipper
*
clipper
);
STDMETHOD
(
GetClipper
)(
THIS_
struct
IWineD3DClipper
**
clipper
);
/* Internally used methods */
/* Internally used methods */
STDMETHOD
(
AddDirtyRect
)(
THIS_
CONST
RECT
*
pRect
)
PURE
;
STDMETHOD
(
AddDirtyRect
)(
THIS_
CONST
RECT
*
pRect
)
PURE
;
STDMETHOD
(
LoadTexture
)(
THIS
)
PURE
;
STDMETHOD
(
LoadTexture
)(
THIS
)
PURE
;
...
@@ -1172,6 +1180,8 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
...
@@ -1172,6 +1180,8 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
#define IWineD3DSurface_GetOverlayPosition(p, a, b) (p)->lpVtbl->GetOverlayPosition(p, a, b)
#define IWineD3DSurface_GetOverlayPosition(p, a, b) (p)->lpVtbl->GetOverlayPosition(p, a, b)
#define IWineD3DSurface_UpdateOverlayZOrder(p, a, b) (p)->lpVtbl->UpdateOverlayZOrder(p, a, b)
#define IWineD3DSurface_UpdateOverlayZOrder(p, a, b) (p)->lpVtbl->UpdateOverlayZOrder(p, a, b)
#define IWineD3DSurface_UpdateOverlay(p, a, b, c, d, e) (p)->lpVtbl->UpdateOverlay(p, a, b, c, d, e)
#define IWineD3DSurface_UpdateOverlay(p, a, b, c, d, e) (p)->lpVtbl->UpdateOverlay(p, a, b, c, d, e)
#define IWineD3DSurface_SetClipper(p, a) (p)->lpVtbl->SetClipper(p, a)
#define IWineD3DSurface_GetClipper(p, a) (p)->lpVtbl->GetClipper(p, a)
/*** IWineD3DSurface (Internal, no d3d mapping) methods ***/
/*** IWineD3DSurface (Internal, no d3d mapping) methods ***/
#define IWineD3DSurface_AddDirtyRect(p,a) (p)->lpVtbl->AddDirtyRect(p,a)
#define IWineD3DSurface_AddDirtyRect(p,a) (p)->lpVtbl->AddDirtyRect(p,a)
#define IWineD3DSurface_LoadTexture(p) (p)->lpVtbl->LoadTexture(p)
#define IWineD3DSurface_LoadTexture(p) (p)->lpVtbl->LoadTexture(p)
...
@@ -1532,6 +1542,54 @@ DECLARE_INTERFACE_(IWineD3DPalette,IUnknown)
...
@@ -1532,6 +1542,54 @@ DECLARE_INTERFACE_(IWineD3DPalette,IUnknown)
#define IWineD3DPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
#define IWineD3DPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
#endif
#endif
/*****************************************************************************
* IDirectDrawClipper interface
*/
#define INTERFACE IWineD3DClipper
DECLARE_INTERFACE_
(
IWineD3DClipper
,
IUnknown
)
{
/*** IUnknown methods ***/
STDMETHOD_
(
HRESULT
,
QueryInterface
)(
THIS_
REFIID
riid
,
void
**
ppvObject
)
PURE
;
STDMETHOD_
(
ULONG
,
AddRef
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
/*** WineD3DBase methods ***/
STDMETHOD_
(
HRESULT
,
GetParent
)(
THIS_
IUnknown
**
parent
)
PURE
;
/*** IWineD3DClipper methods ***/
STDMETHOD
(
GetClipList
)(
THIS_
LPRECT
lpRect
,
LPRGNDATA
lpClipList
,
LPDWORD
lpdwSize
)
PURE
;
STDMETHOD
(
GetHWnd
)(
THIS_
HWND
*
lphWnd
)
PURE
;
STDMETHOD
(
IsClipListChanged
)(
THIS_
BOOL
*
lpbChanged
)
PURE
;
STDMETHOD
(
SetClipList
)(
THIS_
LPRGNDATA
lpClipList
,
DWORD
dwFlags
)
PURE
;
STDMETHOD
(
SetHWnd
)(
THIS_
DWORD
dwFlags
,
HWND
hWnd
)
PURE
;
};
#undef INTERFACE
#if !defined(__cplusplus) || defined(CINTERFACE)
/*** IUnknown methods ***/
#define IWineD3DClipper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IWineD3DClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IWineD3DClipper_Release(p) (p)->lpVtbl->Release(p)
/*** IWineD3DClipper methods ***/
#define IWineD3DClipper_GetClipList(p,a,b,c) (p)->lpVtbl->GetClipList(p,a,b,c)
#define IWineD3DClipper_GetHWnd(p,a) (p)->lpVtbl->GetHWnd(p,a)
#define IWineD3DClipper_IsClipListChanged(p,a) (p)->lpVtbl->IsClipListChanged(p,a)
#define IWineD3DClipper_SetClipList(p,a,b) (p)->lpVtbl->SetClipList(p,a,b)
#define IWineD3DClipper_SetHWnd(p,a,b) (p)->lpVtbl->SetHWnd(p,a,b)
#else
/*** IUnknown methods ***/
#define IWineD3DClipper_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IWineD3DClipper_AddRef(p) (p)->AddRef()
#define IWineD3DClipper_Release(p) (p)->Release()
/*** IWineD3DClipper methods ***/
#define IWineD3DClipper_GetClipList(p,a,b,c) (p)->GetClipList(a,b,c)
#define IWineD3DClipper_GetHWnd(p,a) (p)->GetHWnd(a)
#define IWineD3DClipper_IsClipListChanged(p,a) (p)->IsClipListChanged(a)
#define IWineD3DClipper_SetClipList(p,a,b) (p)->SetClipList(a,b)
#define IWineD3DClipper_SetHWnd(p,a,b) (p)->SetHWnd(a,b)
#endif
/* DDraw Clippers are not created from DDraw objects, they have a seperate creation function */
IWineD3DClipper
*
WINAPI
WineDirect3DCreateClipper
(
IUnknown
*
parent
);
#if 0 /* FIXME: During porting in from d3d8 - the following will be used */
#if 0 /* FIXME: During porting in from d3d8 - the following will be used */
extern HRESULT WINAPI IDirect3DVertexShaderImpl_ParseProgram(IDirect3DVertexShaderImpl* This, CONST DWORD* pFunction);
extern HRESULT WINAPI IDirect3DVertexShaderImpl_ParseProgram(IDirect3DVertexShaderImpl* This, CONST DWORD* pFunction);
/* internal Interfaces */
/* internal Interfaces */
...
...
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