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
2acf8d79
Commit
2acf8d79
authored
Dec 02, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename resource functions to reflect that they're not COM functions.
parent
4d60b663
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
99 additions
and
88 deletions
+99
-88
basetexture.c
dlls/wined3d/basetexture.c
+2
-1
cubetexture.c
dlls/wined3d/cubetexture.c
+8
-8
indexbuffer.c
dlls/wined3d/indexbuffer.c
+9
-9
resource.c
dlls/wined3d/resource.c
+24
-16
surface.c
dlls/wined3d/surface.c
+1
-1
surface_base.c
dlls/wined3d/surface_base.c
+8
-8
surface_gdi.c
dlls/wined3d/surface_gdi.c
+1
-1
texture.c
dlls/wined3d/texture.c
+8
-8
vertexbuffer.c
dlls/wined3d/vertexbuffer.c
+9
-9
volume.c
dlls/wined3d/volume.c
+9
-9
volumetexture.c
dlls/wined3d/volumetexture.c
+8
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+12
-10
No files found.
dlls/wined3d/basetexture.c
View file @
2acf8d79
...
...
@@ -40,7 +40,8 @@ void basetexture_cleanup(IWineD3DBaseTexture *iface)
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
textureName
);
LEAVE_GL
();
}
IWineD3DResourceImpl_CleanUp
((
IWineD3DResource
*
)
iface
);
resource_cleanup
((
IWineD3DResource
*
)
iface
);
}
void
basetexture_unload
(
IWineD3DBaseTexture
*
iface
)
...
...
dlls/wined3d/cubetexture.c
View file @
2acf8d79
...
...
@@ -68,27 +68,27 @@ static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DCubeTexture *iface)
IWineD3DCubeTexture IWineD3DResource parts follow
**************************************************** */
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_GetDevice
(
IWineD3DCubeTexture
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
return
IWineD3DResourceImpl_GetD
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
return
resource_get_d
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetPrivateData
(
IWineD3DCubeTexture
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
return
IWineD3DResourceImpl_SetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
return
resource_set_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_GetPrivateData
(
IWineD3DCubeTexture
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
return
IWineD3DResourceImpl_GetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
return
resource_get_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_FreePrivateData
(
IWineD3DCubeTexture
*
iface
,
REFGUID
refguid
)
{
return
IWineD3DResourceImpl_FreePrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
return
resource_free_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
}
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_SetPriority
(
IWineD3DCubeTexture
*
iface
,
DWORD
PriorityNew
)
{
return
IWineD3DResourceImpl_SetP
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
return
resource_set_p
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
}
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_GetPriority
(
IWineD3DCubeTexture
*
iface
)
{
return
IWineD3DResourceImpl_GetP
riority
((
IWineD3DResource
*
)
iface
);
return
resource_get_p
riority
((
IWineD3DResource
*
)
iface
);
}
static
void
WINAPI
IWineD3DCubeTextureImpl_PreLoad
(
IWineD3DCubeTexture
*
iface
)
{
...
...
@@ -180,11 +180,11 @@ static void WINAPI IWineD3DCubeTextureImpl_UnLoad(IWineD3DCubeTexture *iface) {
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DCubeTextureImpl_GetType
(
IWineD3DCubeTexture
*
iface
)
{
return
IWineD3DResourceImpl_GetT
ype
((
IWineD3DResource
*
)
iface
);
return
resource_get_t
ype
((
IWineD3DResource
*
)
iface
);
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_GetParent
(
IWineD3DCubeTexture
*
iface
,
IUnknown
**
pParent
)
{
return
IWineD3DResourceImpl_GetP
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
return
resource_get_p
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
}
/* ******************************************************
...
...
dlls/wined3d/indexbuffer.c
View file @
2acf8d79
...
...
@@ -74,7 +74,7 @@ static ULONG WINAPI IWineD3DIndexBufferImpl_Release(IWineD3DIndexBuffer *iface)
LEAVE_GL
();
}
IWineD3DResourceImpl_CleanU
p
((
IWineD3DResource
*
)
iface
);
resource_cleanu
p
((
IWineD3DResource
*
)
iface
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
...
...
@@ -84,27 +84,27 @@ static ULONG WINAPI IWineD3DIndexBufferImpl_Release(IWineD3DIndexBuffer *iface)
IWineD3DIndexBuffer IWineD3DResource parts follow
**************************************************** */
static
HRESULT
WINAPI
IWineD3DIndexBufferImpl_GetDevice
(
IWineD3DIndexBuffer
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
return
IWineD3DResourceImpl_GetD
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
return
resource_get_d
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
}
static
HRESULT
WINAPI
IWineD3DIndexBufferImpl_SetPrivateData
(
IWineD3DIndexBuffer
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
return
IWineD3DResourceImpl_SetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
return
resource_set_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
}
static
HRESULT
WINAPI
IWineD3DIndexBufferImpl_GetPrivateData
(
IWineD3DIndexBuffer
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
return
IWineD3DResourceImpl_GetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
return
resource_get_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
}
static
HRESULT
WINAPI
IWineD3DIndexBufferImpl_FreePrivateData
(
IWineD3DIndexBuffer
*
iface
,
REFGUID
refguid
)
{
return
IWineD3DResourceImpl_FreePrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
return
resource_free_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
}
static
DWORD
WINAPI
IWineD3DIndexBufferImpl_SetPriority
(
IWineD3DIndexBuffer
*
iface
,
DWORD
PriorityNew
)
{
return
IWineD3DResourceImpl_SetP
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
return
resource_set_p
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
}
static
DWORD
WINAPI
IWineD3DIndexBufferImpl_GetPriority
(
IWineD3DIndexBuffer
*
iface
)
{
return
IWineD3DResourceImpl_GetP
riority
((
IWineD3DResource
*
)
iface
);
return
resource_get_p
riority
((
IWineD3DResource
*
)
iface
);
}
static
void
WINAPI
IWineD3DIndexBufferImpl_PreLoad
(
IWineD3DIndexBuffer
*
iface
)
{
...
...
@@ -133,11 +133,11 @@ static void WINAPI IWineD3DIndexBufferImpl_UnLoad(IWineD3DIndexBuffer *iface) {
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DIndexBufferImpl_GetType
(
IWineD3DIndexBuffer
*
iface
)
{
return
IWineD3DResourceImpl_GetT
ype
((
IWineD3DResource
*
)
iface
);
return
resource_get_t
ype
((
IWineD3DResource
*
)
iface
);
}
static
HRESULT
WINAPI
IWineD3DIndexBufferImpl_GetParent
(
IWineD3DIndexBuffer
*
iface
,
IUnknown
**
pParent
)
{
return
IWineD3DResourceImpl_GetP
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
return
resource_get_p
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
}
/* ******************************************************
...
...
dlls/wined3d/resource.c
View file @
2acf8d79
...
...
@@ -27,7 +27,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
#define GLINFO_LOCATION ((IWineD3DImpl *)(((IWineD3DDeviceImpl *)This->resource.wineD3DDevice)->wineD3D))->gl_info
void
IWineD3DResourceImpl_CleanUp
(
IWineD3DResource
*
iface
){
void
resource_cleanup
(
IWineD3DResource
*
iface
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
struct
list
*
e1
,
*
e2
;
PrivateData
*
data
;
...
...
@@ -41,7 +42,7 @@ void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface){
LIST_FOR_EACH_SAFE
(
e1
,
e2
,
&
This
->
resource
.
privateData
)
{
data
=
LIST_ENTRY
(
e1
,
PrivateData
,
entry
);
hr
=
IWineD3DResourceImpl_FreePrivateD
ata
(
iface
,
&
data
->
tag
);
hr
=
resource_free_private_d
ata
(
iface
,
&
data
->
tag
);
if
(
hr
!=
WINED3D_OK
)
{
ERR
(
"Failed to free private data when destroying resource %p, hr = %08x
\n
"
,
This
,
hr
);
}
...
...
@@ -57,8 +58,8 @@ void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface){
return
;
}
/* IWineD3DResource Interface follows: */
HRESULT
WINAPI
IWineD3DResourceImpl_GetDevice
(
IWineD3DResource
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
HRESULT
resource_get_device
(
IWineD3DResource
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
This
->
resource
.
wineD3DDevice
);
*
ppDevice
=
(
IWineD3DDevice
*
)
This
->
resource
.
wineD3DDevice
;
...
...
@@ -66,8 +67,7 @@ HRESULT WINAPI IWineD3DResourceImpl_GetDevice(IWineD3DResource *iface, IWineD3DD
return
WINED3D_OK
;
}
static
PrivateData
*
IWineD3DResourceImpl_FindPrivateData
(
IWineD3DResourceImpl
*
This
,
REFGUID
tag
)
static
PrivateData
*
resource_find_private_data
(
IWineD3DResourceImpl
*
This
,
REFGUID
tag
)
{
PrivateData
*
data
;
struct
list
*
entry
;
...
...
@@ -85,12 +85,14 @@ static PrivateData* IWineD3DResourceImpl_FindPrivateData(IWineD3DResourceImpl *T
return
NULL
;
}
HRESULT
WINAPI
IWineD3DResourceImpl_SetPrivateData
(
IWineD3DResource
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
HRESULT
resource_set_private_data
(
IWineD3DResource
*
iface
,
REFGUID
refguid
,
const
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
PrivateData
*
data
;
TRACE
(
"(%p) : %s %p %d %d
\n
"
,
This
,
debugstr_guid
(
refguid
),
pData
,
SizeOfData
,
Flags
);
IWineD3DResourceImpl_FreePrivateD
ata
(
iface
,
refguid
);
resource_free_private_d
ata
(
iface
,
refguid
);
data
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
data
));
if
(
NULL
==
data
)
return
E_OUTOFMEMORY
;
...
...
@@ -123,12 +125,13 @@ HRESULT WINAPI IWineD3DResourceImpl_SetPrivateData(IWineD3DResource *iface, REFG
return
WINED3D_OK
;
}
HRESULT
WINAPI
IWineD3DResourceImpl_GetPrivateData
(
IWineD3DResource
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
HRESULT
resource_get_private_data
(
IWineD3DResource
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
PrivateData
*
data
;
TRACE
(
"(%p) : %p %p %p
\n
"
,
This
,
refguid
,
pData
,
pSizeOfData
);
data
=
IWineD3DResourceImpl_FindPrivateD
ata
(
This
,
refguid
);
data
=
resource_find_private_d
ata
(
This
,
refguid
);
if
(
data
==
NULL
)
return
WINED3DERR_NOTFOUND
;
if
(
*
pSizeOfData
<
data
->
size
)
{
...
...
@@ -152,12 +155,13 @@ HRESULT WINAPI IWineD3DResourceImpl_GetPrivateData(IWineD3DResource *iface, REFG
return
WINED3D_OK
;
}
HRESULT
WINAPI
IWineD3DResourceImpl_FreePrivateData
(
IWineD3DResource
*
iface
,
REFGUID
refguid
)
{
HRESULT
resource_free_private_data
(
IWineD3DResource
*
iface
,
REFGUID
refguid
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
PrivateData
*
data
;
TRACE
(
"(%p) : %s
\n
"
,
This
,
debugstr_guid
(
refguid
));
data
=
IWineD3DResourceImpl_FindPrivateD
ata
(
This
,
refguid
);
data
=
resource_find_private_d
ata
(
This
,
refguid
);
if
(
data
==
NULL
)
return
WINED3DERR_NOTFOUND
;
if
(
data
->
flags
&
WINED3DSPD_IUNKNOWN
)
...
...
@@ -174,7 +178,8 @@ HRESULT WINAPI IWineD3DResourceImpl_FreePrivateData(IWineD3DResource *iface, REF
return
WINED3D_OK
;
}
DWORD
WINAPI
IWineD3DResourceImpl_SetPriority
(
IWineD3DResource
*
iface
,
DWORD
PriorityNew
)
{
DWORD
resource_set_priority
(
IWineD3DResource
*
iface
,
DWORD
PriorityNew
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
DWORD
PriorityOld
=
This
->
resource
.
priority
;
This
->
resource
.
priority
=
PriorityNew
;
...
...
@@ -182,19 +187,22 @@ DWORD WINAPI IWineD3DResourceImpl_SetPriority(IWineD3DResource *iface,
return
PriorityOld
;
}
DWORD
WINAPI
IWineD3DResourceImpl_GetPriority
(
IWineD3DResource
*
iface
)
{
DWORD
resource_get_priority
(
IWineD3DResource
*
iface
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
TRACE
(
"(%p) : returning %d
\n
"
,
This
,
This
->
resource
.
priority
);
return
This
->
resource
.
priority
;
}
WINED3DRESOURCETYPE
WINAPI
IWineD3DResourceImpl_GetType
(
IWineD3DResource
*
iface
)
{
WINED3DRESOURCETYPE
resource_get_type
(
IWineD3DResource
*
iface
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
TRACE
(
"(%p) : returning %d
\n
"
,
This
,
This
->
resource
.
resourceType
);
return
This
->
resource
.
resourceType
;
}
HRESULT
WINAPI
IWineD3DResourceImpl_GetParent
(
IWineD3DResource
*
iface
,
IUnknown
**
pParent
)
{
HRESULT
resource_get_parent
(
IWineD3DResource
*
iface
,
IUnknown
**
pParent
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
IUnknown_AddRef
(
This
->
resource
.
parent
);
*
pParent
=
This
->
resource
.
parent
;
...
...
dlls/wined3d/surface.c
View file @
2acf8d79
...
...
@@ -528,7 +528,7 @@ static ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
palette9
);
IWineD3DResourceImpl_CleanU
p
((
IWineD3DResource
*
)
iface
);
resource_cleanu
p
((
IWineD3DResource
*
)
iface
);
if
(
This
->
overlay_dest
)
{
list_remove
(
&
This
->
overlay_entry
);
...
...
dlls/wined3d/surface_base.c
View file @
2acf8d79
...
...
@@ -119,37 +119,37 @@ ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface) {
IWineD3DSurface IWineD3DResource parts follow
**************************************************** */
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetDevice
(
IWineD3DSurface
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
return
IWineD3DResourceImpl_GetD
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
return
resource_get_d
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
return
IWineD3DResourceImpl_SetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
return
resource_set_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
return
IWineD3DResourceImpl_GetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
return
resource_get_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_FreePrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
)
{
return
IWineD3DResourceImpl_FreePrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
return
resource_free_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
}
DWORD
WINAPI
IWineD3DBaseSurfaceImpl_SetPriority
(
IWineD3DSurface
*
iface
,
DWORD
PriorityNew
)
{
return
IWineD3DResourceImpl_SetP
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
return
resource_set_p
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
}
DWORD
WINAPI
IWineD3DBaseSurfaceImpl_GetPriority
(
IWineD3DSurface
*
iface
)
{
return
IWineD3DResourceImpl_GetP
riority
((
IWineD3DResource
*
)
iface
);
return
resource_get_p
riority
((
IWineD3DResource
*
)
iface
);
}
WINED3DRESOURCETYPE
WINAPI
IWineD3DBaseSurfaceImpl_GetType
(
IWineD3DSurface
*
iface
)
{
TRACE
(
"(%p) : calling resourceimpl_GetType
\n
"
,
iface
);
return
IWineD3DResourceImpl_GetT
ype
((
IWineD3DResource
*
)
iface
);
return
resource_get_t
ype
((
IWineD3DResource
*
)
iface
);
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetParent
(
IWineD3DSurface
*
iface
,
IUnknown
**
pParent
)
{
TRACE
(
"(%p) : calling resourceimpl_GetParent
\n
"
,
iface
);
return
IWineD3DResourceImpl_GetP
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
return
resource_get_p
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
}
/* ******************************************************
...
...
dlls/wined3d/surface_gdi.c
View file @
2acf8d79
...
...
@@ -62,7 +62,7 @@ static ULONG WINAPI IWineGDISurfaceImpl_Release(IWineD3DSurface *iface) {
HeapFree
(
GetProcessHeap
(),
0
,
This
->
palette9
);
IWineD3DResourceImpl_CleanU
p
((
IWineD3DResource
*
)
iface
);
resource_cleanu
p
((
IWineD3DResource
*
)
iface
);
if
(
This
->
overlay_dest
)
{
list_remove
(
&
This
->
overlay_entry
);
...
...
dlls/wined3d/texture.c
View file @
2acf8d79
...
...
@@ -69,27 +69,27 @@ static ULONG WINAPI IWineD3DTextureImpl_Release(IWineD3DTexture *iface) {
IWineD3DTexture IWineD3DResource parts follow
**************************************************** */
static
HRESULT
WINAPI
IWineD3DTextureImpl_GetDevice
(
IWineD3DTexture
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
return
IWineD3DResourceImpl_GetD
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
return
resource_get_d
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_SetPrivateData
(
IWineD3DTexture
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
return
IWineD3DResourceImpl_SetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
return
resource_set_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_GetPrivateData
(
IWineD3DTexture
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
return
IWineD3DResourceImpl_GetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
return
resource_get_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_FreePrivateData
(
IWineD3DTexture
*
iface
,
REFGUID
refguid
)
{
return
IWineD3DResourceImpl_FreePrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
return
resource_free_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
}
static
DWORD
WINAPI
IWineD3DTextureImpl_SetPriority
(
IWineD3DTexture
*
iface
,
DWORD
PriorityNew
)
{
return
IWineD3DResourceImpl_SetP
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
return
resource_set_p
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
}
static
DWORD
WINAPI
IWineD3DTextureImpl_GetPriority
(
IWineD3DTexture
*
iface
)
{
return
IWineD3DResourceImpl_GetP
riority
((
IWineD3DResource
*
)
iface
);
return
resource_get_p
riority
((
IWineD3DResource
*
)
iface
);
}
static
void
WINAPI
IWineD3DTextureImpl_PreLoad
(
IWineD3DTexture
*
iface
)
{
...
...
@@ -169,11 +169,11 @@ static void WINAPI IWineD3DTextureImpl_UnLoad(IWineD3DTexture *iface) {
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DTextureImpl_GetType
(
IWineD3DTexture
*
iface
)
{
return
IWineD3DResourceImpl_GetT
ype
((
IWineD3DResource
*
)
iface
);
return
resource_get_t
ype
((
IWineD3DResource
*
)
iface
);
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_GetParent
(
IWineD3DTexture
*
iface
,
IUnknown
**
pParent
)
{
return
IWineD3DResourceImpl_GetP
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
return
resource_get_p
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
}
/* ******************************************************
...
...
dlls/wined3d/vertexbuffer.c
View file @
2acf8d79
...
...
@@ -72,7 +72,7 @@ static ULONG WINAPI IWineD3DVertexBufferImpl_Release(IWineD3DVertexBuffer *iface
LEAVE_GL
();
}
IWineD3DResourceImpl_CleanU
p
((
IWineD3DResource
*
)
iface
);
resource_cleanu
p
((
IWineD3DResource
*
)
iface
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
...
...
@@ -82,27 +82,27 @@ static ULONG WINAPI IWineD3DVertexBufferImpl_Release(IWineD3DVertexBuffer *iface
IWineD3DVertexBuffer IWineD3DResource parts follow
**************************************************** */
static
HRESULT
WINAPI
IWineD3DVertexBufferImpl_GetDevice
(
IWineD3DVertexBuffer
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
return
IWineD3DResourceImpl_GetD
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
return
resource_get_d
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
}
static
HRESULT
WINAPI
IWineD3DVertexBufferImpl_SetPrivateData
(
IWineD3DVertexBuffer
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
return
IWineD3DResourceImpl_SetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
return
resource_set_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
}
static
HRESULT
WINAPI
IWineD3DVertexBufferImpl_GetPrivateData
(
IWineD3DVertexBuffer
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
return
IWineD3DResourceImpl_GetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
return
resource_get_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
}
static
HRESULT
WINAPI
IWineD3DVertexBufferImpl_FreePrivateData
(
IWineD3DVertexBuffer
*
iface
,
REFGUID
refguid
)
{
return
IWineD3DResourceImpl_FreePrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
return
resource_free_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
}
static
DWORD
WINAPI
IWineD3DVertexBufferImpl_SetPriority
(
IWineD3DVertexBuffer
*
iface
,
DWORD
PriorityNew
)
{
return
IWineD3DResourceImpl_SetP
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
return
resource_set_p
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
}
static
DWORD
WINAPI
IWineD3DVertexBufferImpl_GetPriority
(
IWineD3DVertexBuffer
*
iface
)
{
return
IWineD3DResourceImpl_GetP
riority
((
IWineD3DResource
*
)
iface
);
return
resource_get_p
riority
((
IWineD3DResource
*
)
iface
);
}
static
inline
void
fixup_d3dcolor
(
DWORD
*
pos
)
{
...
...
@@ -704,11 +704,11 @@ static void WINAPI IWineD3DVertexBufferImpl_UnLoad(IWineD3DVertexBuffer *iface)
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DVertexBufferImpl_GetType
(
IWineD3DVertexBuffer
*
iface
)
{
return
IWineD3DResourceImpl_GetT
ype
((
IWineD3DResource
*
)
iface
);
return
resource_get_t
ype
((
IWineD3DResource
*
)
iface
);
}
static
HRESULT
WINAPI
IWineD3DVertexBufferImpl_GetParent
(
IWineD3DVertexBuffer
*
iface
,
IUnknown
**
pParent
)
{
return
IWineD3DResourceImpl_GetP
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
return
resource_get_p
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
}
/* ******************************************************
...
...
dlls/wined3d/volume.c
View file @
2acf8d79
...
...
@@ -94,7 +94,7 @@ static ULONG WINAPI IWineD3DVolumeImpl_Release(IWineD3DVolume *iface) {
TRACE
(
"(%p) : Releasing from %d
\n
"
,
This
,
This
->
resource
.
ref
);
ref
=
InterlockedDecrement
(
&
This
->
resource
.
ref
);
if
(
ref
==
0
)
{
IWineD3DResourceImpl_CleanU
p
((
IWineD3DResource
*
)
iface
);
resource_cleanu
p
((
IWineD3DResource
*
)
iface
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
...
...
@@ -104,31 +104,31 @@ static ULONG WINAPI IWineD3DVolumeImpl_Release(IWineD3DVolume *iface) {
IWineD3DVolume IWineD3DResource parts follow
**************************************************** */
static
HRESULT
WINAPI
IWineD3DVolumeImpl_GetParent
(
IWineD3DVolume
*
iface
,
IUnknown
**
pParent
)
{
return
IWineD3DResourceImpl_GetP
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
return
resource_get_p
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
}
static
HRESULT
WINAPI
IWineD3DVolumeImpl_GetDevice
(
IWineD3DVolume
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
return
IWineD3DResourceImpl_GetD
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
return
resource_get_d
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
}
static
HRESULT
WINAPI
IWineD3DVolumeImpl_SetPrivateData
(
IWineD3DVolume
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
return
IWineD3DResourceImpl_SetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
return
resource_set_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
}
static
HRESULT
WINAPI
IWineD3DVolumeImpl_GetPrivateData
(
IWineD3DVolume
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
return
IWineD3DResourceImpl_GetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
return
resource_get_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
}
static
HRESULT
WINAPI
IWineD3DVolumeImpl_FreePrivateData
(
IWineD3DVolume
*
iface
,
REFGUID
refguid
)
{
return
IWineD3DResourceImpl_FreePrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
return
resource_free_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
}
static
DWORD
WINAPI
IWineD3DVolumeImpl_SetPriority
(
IWineD3DVolume
*
iface
,
DWORD
PriorityNew
)
{
return
IWineD3DResourceImpl_SetP
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
return
resource_set_p
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
}
static
DWORD
WINAPI
IWineD3DVolumeImpl_GetPriority
(
IWineD3DVolume
*
iface
)
{
return
IWineD3DResourceImpl_GetP
riority
((
IWineD3DResource
*
)
iface
);
return
resource_get_p
riority
((
IWineD3DResource
*
)
iface
);
}
static
void
WINAPI
IWineD3DVolumeImpl_PreLoad
(
IWineD3DVolume
*
iface
)
{
...
...
@@ -143,7 +143,7 @@ static void WINAPI IWineD3DVolumeImpl_UnLoad(IWineD3DVolume *iface) {
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DVolumeImpl_GetType
(
IWineD3DVolume
*
iface
)
{
return
IWineD3DResourceImpl_GetT
ype
((
IWineD3DResource
*
)
iface
);
return
resource_get_t
ype
((
IWineD3DResource
*
)
iface
);
}
/* *******************************************
...
...
dlls/wined3d/volumetexture.c
View file @
2acf8d79
...
...
@@ -67,27 +67,27 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *ifa
IWineD3DVolumeTexture IWineD3DResource parts follow
**************************************************** */
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_GetDevice
(
IWineD3DVolumeTexture
*
iface
,
IWineD3DDevice
**
ppDevice
)
{
return
IWineD3DResourceImpl_GetD
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
return
resource_get_d
evice
((
IWineD3DResource
*
)
iface
,
ppDevice
);
}
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_SetPrivateData
(
IWineD3DVolumeTexture
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
return
IWineD3DResourceImpl_SetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
return
resource_set_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
}
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_GetPrivateData
(
IWineD3DVolumeTexture
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
return
IWineD3DResourceImpl_GetPrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
return
resource_get_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
,
pData
,
pSizeOfData
);
}
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_FreePrivateData
(
IWineD3DVolumeTexture
*
iface
,
REFGUID
refguid
)
{
return
IWineD3DResourceImpl_FreePrivateD
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
return
resource_free_private_d
ata
((
IWineD3DResource
*
)
iface
,
refguid
);
}
static
DWORD
WINAPI
IWineD3DVolumeTextureImpl_SetPriority
(
IWineD3DVolumeTexture
*
iface
,
DWORD
PriorityNew
)
{
return
IWineD3DResourceImpl_SetP
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
return
resource_set_p
riority
((
IWineD3DResource
*
)
iface
,
PriorityNew
);
}
static
DWORD
WINAPI
IWineD3DVolumeTextureImpl_GetPriority
(
IWineD3DVolumeTexture
*
iface
)
{
return
IWineD3DResourceImpl_GetP
riority
((
IWineD3DResource
*
)
iface
);
return
resource_get_p
riority
((
IWineD3DResource
*
)
iface
);
}
static
void
WINAPI
IWineD3DVolumeTextureImpl_PreLoad
(
IWineD3DVolumeTexture
*
iface
)
{
...
...
@@ -149,11 +149,11 @@ static void WINAPI IWineD3DVolumeTextureImpl_UnLoad(IWineD3DVolumeTexture *iface
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DVolumeTextureImpl_GetType
(
IWineD3DVolumeTexture
*
iface
)
{
return
IWineD3DResourceImpl_GetT
ype
((
IWineD3DResource
*
)
iface
);
return
resource_get_t
ype
((
IWineD3DResource
*
)
iface
);
}
static
HRESULT
WINAPI
IWineD3DVolumeTextureImpl_GetParent
(
IWineD3DVolumeTexture
*
iface
,
IUnknown
**
pParent
)
{
return
IWineD3DResourceImpl_GetP
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
return
resource_get_p
arent
((
IWineD3DResource
*
)
iface
,
pParent
);
}
/* ******************************************************
...
...
dlls/wined3d/wined3d_private.h
View file @
2acf8d79
...
...
@@ -1119,6 +1119,18 @@ typedef struct IWineD3DResourceImpl
IWineD3DResourceClass
resource
;
}
IWineD3DResourceImpl
;
void
resource_cleanup
(
IWineD3DResource
*
iface
);
HRESULT
resource_free_private_data
(
IWineD3DResource
*
iface
,
REFGUID
guid
);
HRESULT
resource_get_device
(
IWineD3DResource
*
iface
,
IWineD3DDevice
**
device
);
HRESULT
resource_get_parent
(
IWineD3DResource
*
iface
,
IUnknown
**
parent
);
DWORD
resource_get_priority
(
IWineD3DResource
*
iface
);
HRESULT
resource_get_private_data
(
IWineD3DResource
*
iface
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
);
WINED3DRESOURCETYPE
resource_get_type
(
IWineD3DResource
*
iface
);
DWORD
resource_set_priority
(
IWineD3DResource
*
iface
,
DWORD
new_priority
);
HRESULT
resource_set_private_data
(
IWineD3DResource
*
iface
,
REFGUID
guid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
);
/* Tests show that the start address of resources is 32 byte aligned */
#define RESOURCE_ALIGNMENT 32
...
...
@@ -1946,16 +1958,6 @@ unsigned int count_bits(unsigned int mask);
*
* Note: Only require classes which are subclassed, ie resource, basetexture,
*/
/* IWineD3DResource */
extern
HRESULT
WINAPI
IWineD3DResourceImpl_GetParent
(
IWineD3DResource
*
iface
,
IUnknown
**
pParent
);
extern
HRESULT
WINAPI
IWineD3DResourceImpl_GetDevice
(
IWineD3DResource
*
iface
,
IWineD3DDevice
**
ppDevice
);
extern
HRESULT
WINAPI
IWineD3DResourceImpl_SetPrivateData
(
IWineD3DResource
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
);
extern
HRESULT
WINAPI
IWineD3DResourceImpl_GetPrivateData
(
IWineD3DResource
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
);
extern
HRESULT
WINAPI
IWineD3DResourceImpl_FreePrivateData
(
IWineD3DResource
*
iface
,
REFGUID
refguid
);
extern
DWORD
WINAPI
IWineD3DResourceImpl_SetPriority
(
IWineD3DResource
*
iface
,
DWORD
PriorityNew
);
extern
DWORD
WINAPI
IWineD3DResourceImpl_GetPriority
(
IWineD3DResource
*
iface
);
extern
WINED3DRESOURCETYPE
WINAPI
IWineD3DResourceImpl_GetType
(
IWineD3DResource
*
iface
);
void
IWineD3DResourceImpl_CleanUp
(
IWineD3DResource
*
iface
);
/* IWineD3DVertexBuffer */
extern
const
BYTE
*
IWineD3DVertexBufferImpl_GetMemory
(
IWineD3DVertexBuffer
*
iface
,
DWORD
iOffset
,
GLint
*
vbo
);
...
...
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