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
2b3a364e
Commit
2b3a364e
authored
Jul 06, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Use unsafe_impl_from_IDirect3DVertexBuffer9 for app provided ifaces.
parent
bb4f7505
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
buffer.c
dlls/d3d9/buffer.c
+9
-0
d3d9_private.h
dlls/d3d9/d3d9_private.h
+1
-0
device.c
dlls/d3d9/device.c
+3
-2
No files found.
dlls/d3d9/buffer.c
View file @
2b3a364e
...
...
@@ -300,6 +300,15 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im
return
D3D_OK
;
}
IDirect3DVertexBuffer9Impl
*
unsafe_impl_from_IDirect3DVertexBuffer9
(
IDirect3DVertexBuffer9
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
d3d9_vertexbuffer_vtbl
);
return
impl_from_IDirect3DVertexBuffer9
(
iface
);
}
static
inline
IDirect3DIndexBuffer9Impl
*
impl_from_IDirect3DIndexBuffer9
(
IDirect3DIndexBuffer9
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DIndexBuffer9Impl
,
IDirect3DIndexBuffer9_iface
);
...
...
dlls/d3d9/d3d9_private.h
View file @
2b3a364e
...
...
@@ -262,6 +262,7 @@ typedef struct IDirect3DVertexBuffer9Impl
HRESULT
vertexbuffer_init
(
IDirect3DVertexBuffer9Impl
*
buffer
,
IDirect3DDevice9Impl
*
device
,
UINT
size
,
UINT
usage
,
DWORD
fvf
,
D3DPOOL
pool
)
DECLSPEC_HIDDEN
;
IDirect3DVertexBuffer9Impl
*
unsafe_impl_from_IDirect3DVertexBuffer9
(
IDirect3DVertexBuffer9
*
iface
)
DECLSPEC_HIDDEN
;
/* --------------------- */
/* IDirect3DIndexBuffer9 */
...
...
dlls/d3d9/device.c
View file @
2b3a364e
...
...
@@ -2049,9 +2049,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_ProcessVertices(IDirect3DDevice9Ex *i
IDirect3DVertexDeclaration9
*
pVertexDecl
,
DWORD
Flags
)
{
IDirect3DDevice9Impl
*
This
=
impl_from_IDirect3DDevice9Ex
(
iface
);
IDirect3DVertexBuffer9Impl
*
dest
=
unsafe_impl_from_IDirect3DVertexBuffer9
(
pDestBuffer
);
IDirect3DVertexDeclaration9Impl
*
Decl
=
(
IDirect3DVertexDeclaration9Impl
*
)
pVertexDecl
;
HRESULT
hr
;
IDirect3DVertexBuffer9Impl
*
dest
=
(
IDirect3DVertexBuffer9Impl
*
)
pDestBuffer
;
TRACE
(
"iface %p, src_start_idx %u, dst_idx %u, vertex_count %u, dst_buffer %p, declaration %p, flags %#x.
\n
"
,
iface
,
SrcStartIndex
,
DestIndex
,
VertexCount
,
pDestBuffer
,
pVertexDecl
,
Flags
);
...
...
@@ -2446,6 +2446,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(IDirect3DDevice9Ex *i
UINT
StreamNumber
,
IDirect3DVertexBuffer9
*
pStreamData
,
UINT
OffsetInBytes
,
UINT
Stride
)
{
IDirect3DDevice9Impl
*
This
=
impl_from_IDirect3DDevice9Ex
(
iface
);
IDirect3DVertexBuffer9Impl
*
streamdata
=
unsafe_impl_from_IDirect3DVertexBuffer9
(
pStreamData
);
HRESULT
hr
;
TRACE
(
"iface %p, stream_idx %u, buffer %p, offset %u, stride %u.
\n
"
,
...
...
@@ -2453,7 +2454,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(IDirect3DDevice9Ex *i
wined3d_mutex_lock
();
hr
=
wined3d_device_set_stream_source
(
This
->
wined3d_device
,
StreamNumber
,
pStreamData
?
((
IDirect3DVertexBuffer9Impl
*
)
pStreamData
)
->
wineD3DVertexBuffer
:
NULL
,
streamdata
?
streamdata
->
wineD3DVertexBuffer
:
NULL
,
OffsetInBytes
,
Stride
);
wined3d_mutex_unlock
();
...
...
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