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
c796f764
Commit
c796f764
authored
Feb 24, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add IWineD3DRendertargetView.
parent
6ace799f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
164 additions
and
0 deletions
+164
-0
Makefile.in
dlls/wined3d/Makefile.in
+1
-0
device.c
dlls/wined3d/device.c
+24
-0
view.c
dlls/wined3d/view.c
+110
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+12
-0
wined3d.idl
include/wine/wined3d.idl
+17
-0
No files found.
dlls/wined3d/Makefile.in
View file @
c796f764
...
...
@@ -37,6 +37,7 @@ C_SRCS = \
utils.c
\
vertexdeclaration.c
\
vertexshader.c
\
view.c
\
volume.c
\
volumetexture.c
\
wined3d_main.c
...
...
dlls/wined3d/device.c
View file @
c796f764
...
...
@@ -793,6 +793,29 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
return
hr
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateRendertargetView
(
IWineD3DDevice
*
iface
,
IWineD3DResource
*
resource
,
IUnknown
*
parent
,
IWineD3DRendertargetView
**
rendertarget_view
)
{
struct
wined3d_rendertarget_view
*
object
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate memory
\n
"
);
return
E_OUTOFMEMORY
;
}
object
->
vtbl
=
&
wined3d_rendertarget_view_vtbl
;
object
->
refcount
=
1
;
IWineD3DResource_AddRef
(
resource
);
object
->
resource
=
resource
;
object
->
parent
=
parent
;
*
rendertarget_view
=
(
IWineD3DRendertargetView
*
)
object
;
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateTexture
(
IWineD3DDevice
*
iface
,
UINT
Width
,
UINT
Height
,
UINT
Levels
,
DWORD
Usage
,
WINED3DFORMAT
Format
,
WINED3DPOOL
Pool
,
IWineD3DTexture
**
ppTexture
,
HANDLE
*
pSharedHandle
,
IUnknown
*
parent
)
...
...
@@ -7575,6 +7598,7 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_CreateIndexBuffer
,
IWineD3DDeviceImpl_CreateStateBlock
,
IWineD3DDeviceImpl_CreateSurface
,
IWineD3DDeviceImpl_CreateRendertargetView
,
IWineD3DDeviceImpl_CreateTexture
,
IWineD3DDeviceImpl_CreateVolumeTexture
,
IWineD3DDeviceImpl_CreateVolume
,
...
...
dlls/wined3d/view.c
0 → 100644
View file @
c796f764
/*
* Copyright 2009 Henri Verbeet for CodeWeavers
*
* 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 "wine/port.h"
#include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
rendertarget_view_QueryInterface
(
IWineD3DRendertargetView
*
iface
,
REFIID
riid
,
void
**
object
)
{
TRACE
(
"iface %p, riid %s, object %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_IWineD3DRendertargetView
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBase
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
IUnknown_AddRef
(
iface
);
*
object
=
iface
;
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE
\n
"
,
debugstr_guid
(
riid
));
*
object
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
rendertarget_view_AddRef
(
IWineD3DRendertargetView
*
iface
)
{
struct
wined3d_rendertarget_view
*
This
=
(
struct
wined3d_rendertarget_view
*
)
iface
;
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
TRACE
(
"%p increasing refcount to %u
\n
"
,
This
,
refcount
);
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
rendertarget_view_Release
(
IWineD3DRendertargetView
*
iface
)
{
struct
wined3d_rendertarget_view
*
This
=
(
struct
wined3d_rendertarget_view
*
)
iface
;
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
if
(
!
refcount
)
{
IWineD3DResource_Release
(
This
->
resource
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
refcount
;
}
/* IWineD3DBase methods */
static
HRESULT
STDMETHODCALLTYPE
rendertarget_view_GetParent
(
IWineD3DRendertargetView
*
iface
,
IUnknown
**
parent
)
{
struct
wined3d_rendertarget_view
*
This
=
(
struct
wined3d_rendertarget_view
*
)
iface
;
IUnknown_AddRef
(
This
->
parent
);
*
parent
=
This
->
parent
;
return
WINED3D_OK
;
}
/* IWineD3DRendertargetView methods */
static
HRESULT
STDMETHODCALLTYPE
rendertarget_view_GetResource
(
IWineD3DRendertargetView
*
iface
,
IWineD3DResource
**
resource
)
{
struct
wined3d_rendertarget_view
*
This
=
(
struct
wined3d_rendertarget_view
*
)
iface
;
IWineD3DResource_AddRef
(
This
->
resource
);
*
resource
=
This
->
resource
;
return
WINED3D_OK
;
}
const
struct
IWineD3DRendertargetViewVtbl
wined3d_rendertarget_view_vtbl
=
{
/* IUnknown methods */
rendertarget_view_QueryInterface
,
rendertarget_view_AddRef
,
rendertarget_view_Release
,
/* IWineD3DBase methods */
rendertarget_view_GetParent
,
/* IWineD3DRendertargetView methods */
rendertarget_view_GetResource
,
};
dlls/wined3d/wined3d_private.h
View file @
c796f764
...
...
@@ -1985,6 +1985,18 @@ struct wined3d_buffer
extern
const
IWineD3DBufferVtbl
wined3d_buffer_vtbl
;
/* IWineD3DRendertargetView */
struct
wined3d_rendertarget_view
{
const
struct
IWineD3DRendertargetViewVtbl
*
vtbl
;
LONG
refcount
;
IWineD3DResource
*
resource
;
IUnknown
*
parent
;
};
extern
const
IWineD3DRendertargetViewVtbl
wined3d_rendertarget_view_vtbl
;
/*****************************************************************************
* IWineD3DSwapChainImpl implementation structure (extends IUnknown)
*/
...
...
include/wine/wined3d.idl
View file @
c796f764
...
...
@@ -2396,6 +2396,18 @@ interface IWineD3DResource : IWineD3DBase
[
object
,
local
,
uuid
(
f7d8abf4
-
fb93
-
43
e4
-
9
c96
-
4618
cf9b3cbc
)
]
interface
IWineD3DRendertargetView
:
IWineD3DBase
{
HRESULT
GetResource
(
[
out
]
IWineD3DResource
**
resource
)
;
}
[
object
,
local
,
uuid
(
217
f671e
-
6
f30
-
11
d9
-
c687
-
00046142
c14f
)
]
interface
IWineD3DVertexBuffer
:
IWineD3DResource
...
...
@@ -3012,6 +3024,11 @@ interface IWineD3DDevice : IWineD3DBase
[
in
]
WINED3DSURFTYPE
surface_type
,
[
in
]
IUnknown
*
parent
)
;
HRESULT
CreateRendertargetView
(
[
in
]
IWineD3DResource
*
resource
,
[
in
]
IUnknown
*
parent
,
[
out
]
IWineD3DRendertargetView
**
rendertarget_view
)
;
HRESULT
CreateTexture
(
[
in
]
UINT
width
,
[
in
]
UINT
height
,
...
...
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