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
a0b41772
Commit
a0b41772
authored
Feb 13, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Feb 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Add an IDirect3DVertexDeclaration8 class to hold the wined3d vertex declaration.
parent
8f088406
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
0 deletions
+109
-0
Makefile.in
dlls/d3d8/Makefile.in
+1
-0
d3d8_private.h
dlls/d3d8/d3d8_private.h
+32
-0
vertexdeclaration.c
dlls/d3d8/vertexdeclaration.c
+76
-0
No files found.
dlls/d3d8/Makefile.in
View file @
a0b41772
...
...
@@ -21,6 +21,7 @@ C_SRCS = \
swapchain.c
\
texture.c
\
vertexbuffer.c
\
vertexdeclaration.c
\
vertexshader.c
\
volume.c
\
volumetexture.c
...
...
dlls/d3d8/d3d8_private.h
View file @
a0b41772
...
...
@@ -437,6 +437,9 @@ struct IDirect3DVolumeTexture8Impl
DEFINE_GUID
(
IID_IDirect3DStateBlock8
,
0x83b073ce
,
0x6f30
,
0x11d9
,
0xc6
,
0x87
,
0x0
,
0x4
,
0x61
,
0x42
,
0xc1
,
0x4f
);
DEFINE_GUID
(
IID_IDirect3DVertexDeclaration8
,
0x5dd7478d
,
0xcbf3
,
0x41a6
,
0x8c
,
0xfd
,
0xfd
,
0x19
,
0x2b
,
0x11
,
0xc7
,
0x90
);
DEFINE_GUID
(
IID_IDirect3DVertexShader8
,
0xefc5557e
,
0x6265
,
0x4613
,
0x8a
,
0x94
,
0x43
,
0x85
,
0x78
,
0x89
,
0xeb
,
0x36
);
...
...
@@ -488,6 +491,35 @@ typedef struct IDirect3DStateBlock8Impl {
}
IDirect3DStateBlock8Impl
;
/*****************************************************************************
* IDirect3DVertexDeclaration8 interface
*/
#define INTERFACE IDirect3DVertexDeclaration8
DECLARE_INTERFACE_
(
IDirect3DVertexDeclaration8
,
IUnknown
)
{
/*** IUnknown methods ***/
STDMETHOD_
(
HRESULT
,
QueryInterface
)(
THIS_
REFIID
riid
,
void
**
obj_ptr
)
PURE
;
STDMETHOD_
(
ULONG
,
AddRef
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
};
#undef INTERFACE
/*** IUnknown methods ***/
#define IDirect3DVertexDeclaration8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DVertexDeclaration8_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DVertexDeclaration8_Release(p) (p)->lpVtbl->Release(p)
/*** Implementation ***/
extern
const
IDirect3DVertexDeclaration8Vtbl
Direct3DVertexDeclaration8_Vtbl
;
typedef
struct
{
const
IDirect3DVertexDeclaration8Vtbl
*
lpVtbl
;
LONG
ref_count
;
IWineD3DVertexDeclaration
*
wined3d_vertex_declaration
;
}
IDirect3DVertexDeclaration8Impl
;
/*****************************************************************************
* IDirect3DVertexShader9 interface
*/
#define INTERFACE IDirect3DVertexShader8
...
...
dlls/d3d8/vertexdeclaration.c
0 → 100644
View file @
a0b41772
/*
* IDirect3DVertexDeclaration8 implementation
*
* Copyright 2007 Henri Verbeet
*
* 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
*/
/* IDirect3DVertexDeclaration8 is internal to our implementation.
* It's not visible in the API. */
#include "config.h"
#include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d8
);
/* IUnknown */
static
HRESULT
WINAPI
IDirect3DVertexDeclaration8Impl_QueryInterface
(
IDirect3DVertexDeclaration8
*
iface
,
REFIID
riid
,
void
**
obj_ptr
)
{
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj_ptr
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DVertexDeclaration8
))
{
IUnknown_AddRef
(
iface
);
*
obj_ptr
=
iface
;
return
S_OK
;
}
*
obj_ptr
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirect3DVertexDeclaration8Impl_AddRef
(
IDirect3DVertexDeclaration8
*
iface
)
{
IDirect3DVertexDeclaration8Impl
*
This
=
(
IDirect3DVertexDeclaration8Impl
*
)
iface
;
ULONG
ref_count
=
InterlockedIncrement
(
&
This
->
ref_count
);
TRACE
(
"(%p) : AddRef increasing to %d
\n
"
,
This
,
ref_count
);
return
ref_count
;
}
static
ULONG
WINAPI
IDirect3DVertexDeclaration8Impl_Release
(
IDirect3DVertexDeclaration8
*
iface
)
{
IDirect3DVertexDeclaration8Impl
*
This
=
(
IDirect3DVertexDeclaration8Impl
*
)
iface
;
ULONG
ref_count
=
InterlockedDecrement
(
&
This
->
ref_count
);
TRACE
(
"(%p) : Releasing to %d
\n
"
,
This
,
ref_count
);
if
(
!
ref_count
)
{
IWineD3DVertexDeclaration_Release
(
This
->
wined3d_vertex_declaration
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref_count
;
}
const
IDirect3DVertexDeclaration8Vtbl
Direct3DVertexDeclaration8_Vtbl
=
{
IDirect3DVertexDeclaration8Impl_QueryInterface
,
IDirect3DVertexDeclaration8Impl_AddRef
,
IDirect3DVertexDeclaration8Impl_Release
};
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