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
fde802a0
Commit
fde802a0
authored
Jun 29, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
Jul 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Forward D3DXCreateVolumeTextureFromFile functions to…
d3dx9: Forward D3DXCreateVolumeTextureFromFile functions to D3DXCreateVolumeTextureFromFileInMemoryEx.
parent
07b0f254
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
142 additions
and
4 deletions
+142
-4
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+4
-4
texture.c
dlls/d3dx9_36/texture.c
+138
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
fde802a0
...
...
@@ -107,12 +107,12 @@
@ stub D3DXCreateTextureShader(ptr ptr)
@ stub D3DXCreateTorus(ptr long long long long ptr ptr)
@ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr)
@ st
ub
D3DXCreateVolumeTextureFromFileA(ptr ptr ptr)
@ st
ub
D3DXCreateVolumeTextureFromFileExA(ptr ptr long long long long long long long long long long ptr ptr ptr)
@ st
ub
D3DXCreateVolumeTextureFromFileExW(ptr ptr long long long long long long long long long long ptr ptr ptr)
@ st
dcall
D3DXCreateVolumeTextureFromFileA(ptr ptr ptr)
@ st
dcall
D3DXCreateVolumeTextureFromFileExA(ptr ptr long long long long long long long long long long ptr ptr ptr)
@ st
dcall
D3DXCreateVolumeTextureFromFileExW(ptr ptr long long long long long long long long long long ptr ptr ptr)
@ stdcall D3DXCreateVolumeTextureFromFileInMemory(ptr ptr long ptr)
@ stdcall D3DXCreateVolumeTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long long ptr ptr ptr)
@ st
ub
D3DXCreateVolumeTextureFromFileW(ptr ptr ptr)
@ st
dcall
D3DXCreateVolumeTextureFromFileW(ptr ptr ptr)
@ stub D3DXCreateVolumeTextureFromResourceA(ptr long ptr ptr)
@ stub D3DXCreateVolumeTextureFromResourceExA(ptr long ptr long long long long long long long long long long ptr ptr ptr)
@ stub D3DXCreateVolumeTextureFromResourceExW(ptr long ptr long long long long long long long long long long ptr ptr ptr)
...
...
dlls/d3dx9_36/texture.c
View file @
fde802a0
...
...
@@ -977,6 +977,144 @@ HRESULT WINAPI D3DXCreateVolumeTexture(LPDIRECT3DDEVICE9 device,
usage
,
format
,
pool
,
texture
,
NULL
);
}
HRESULT
WINAPI
D3DXCreateVolumeTextureFromFileA
(
IDirect3DDevice9
*
device
,
const
char
*
filename
,
IDirect3DVolumeTexture9
**
volume_texture
)
{
int
len
;
HRESULT
hr
;
void
*
data
;
DWORD
data_size
;
WCHAR
*
filenameW
;
TRACE
(
"(%p, %s, %p): relay
\n
"
,
device
,
debugstr_a
(
filename
),
volume_texture
);
if
(
!
filename
)
return
D3DERR_INVALIDCALL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
);
filenameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
filenameW
)
return
E_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
filenameW
,
len
);
hr
=
map_view_of_file
(
filenameW
,
&
data
,
&
data_size
);
HeapFree
(
GetProcessHeap
(),
0
,
filenameW
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
hr
=
D3DXCreateVolumeTextureFromFileInMemoryEx
(
device
,
data
,
data_size
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
volume_texture
);
UnmapViewOfFile
(
data
);
return
hr
;
}
HRESULT
WINAPI
D3DXCreateVolumeTextureFromFileW
(
IDirect3DDevice9
*
device
,
const
WCHAR
*
filename
,
IDirect3DVolumeTexture9
**
volume_texture
)
{
HRESULT
hr
;
void
*
data
;
DWORD
data_size
;
TRACE
(
"(%p, %s, %p): relay
\n
"
,
device
,
debugstr_w
(
filename
),
volume_texture
);
if
(
!
filename
)
return
D3DERR_INVALIDCALL
;
hr
=
map_view_of_file
(
filename
,
&
data
,
&
data_size
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
hr
=
D3DXCreateVolumeTextureFromFileInMemoryEx
(
device
,
data
,
data_size
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
volume_texture
);
UnmapViewOfFile
(
data
);
return
hr
;
}
HRESULT
WINAPI
D3DXCreateVolumeTextureFromFileExA
(
IDirect3DDevice9
*
device
,
const
char
*
filename
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
mip_levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
,
DWORD
filter
,
DWORD
mip_filter
,
D3DCOLOR
color_key
,
D3DXIMAGE_INFO
*
src_info
,
PALETTEENTRY
*
palette
,
IDirect3DVolumeTexture9
**
volume_texture
)
{
int
len
;
HRESULT
hr
;
WCHAR
*
filenameW
;
void
*
data
;
DWORD
data_size
;
TRACE
(
"(%p, %s, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay
\n
"
,
device
,
debugstr_a
(
filename
),
width
,
height
,
depth
,
mip_levels
,
usage
,
format
,
pool
,
filter
,
mip_filter
,
color_key
,
src_info
,
palette
,
volume_texture
);
if
(
!
filename
)
return
D3DERR_INVALIDCALL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
);
filenameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
filenameW
)
return
E_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
filenameW
,
len
);
hr
=
map_view_of_file
(
filenameW
,
&
data
,
&
data_size
);
HeapFree
(
GetProcessHeap
(),
0
,
filenameW
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
hr
=
D3DXCreateVolumeTextureFromFileInMemoryEx
(
device
,
data
,
data_size
,
width
,
height
,
depth
,
mip_levels
,
usage
,
format
,
pool
,
filter
,
mip_filter
,
color_key
,
src_info
,
palette
,
volume_texture
);
UnmapViewOfFile
(
data
);
return
hr
;
}
HRESULT
WINAPI
D3DXCreateVolumeTextureFromFileExW
(
IDirect3DDevice9
*
device
,
const
WCHAR
*
filename
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
mip_levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
,
DWORD
filter
,
DWORD
mip_filter
,
D3DCOLOR
color_key
,
D3DXIMAGE_INFO
*
src_info
,
PALETTEENTRY
*
palette
,
IDirect3DVolumeTexture9
**
volume_texture
)
{
HRESULT
hr
;
void
*
data
;
DWORD
data_size
;
TRACE
(
"(%p, %s, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay
\n
"
,
device
,
debugstr_w
(
filename
),
width
,
height
,
depth
,
mip_levels
,
usage
,
format
,
pool
,
filter
,
mip_filter
,
color_key
,
src_info
,
palette
,
volume_texture
);
if
(
!
filename
)
return
D3DERR_INVALIDCALL
;
hr
=
map_view_of_file
(
filename
,
&
data
,
&
data_size
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
hr
=
D3DXCreateVolumeTextureFromFileInMemoryEx
(
device
,
data
,
data_size
,
width
,
height
,
depth
,
mip_levels
,
usage
,
format
,
pool
,
filter
,
mip_filter
,
color_key
,
src_info
,
palette
,
volume_texture
);
UnmapViewOfFile
(
data
);
return
hr
;
}
HRESULT
WINAPI
D3DXCreateVolumeTextureFromFileInMemory
(
IDirect3DDevice9
*
device
,
const
void
*
data
,
UINT
data_size
,
...
...
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