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
ae695bdf
Commit
ae695bdf
authored
Aug 30, 2010
by
Owen Rudge
Committed by
Alexandre Julliard
Aug 31, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement missing D3DXCreateTextureFromFile functions.
parent
39b98144
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
7 deletions
+67
-7
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+5
-5
texture.c
dlls/d3dx9_36/texture.c
+62
-2
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
ae695bdf
...
...
@@ -93,12 +93,12 @@
@ stub D3DXCreateTextA
@ stub D3DXCreateTextW
@ stdcall D3DXCreateTexture(ptr long long long long long long ptr)
@ stdcall D3DXCreateTextureFromFileA(ptr
p
tr ptr)
@ st
ub D3DXCreateTextureFromFileExA
@ stdcall D3DXCreateTextureFromFileExW(ptr
p
tr long long long long long long long long long ptr ptr ptr)
@ st
ub D3DXCreateTextureFromFileInMemory
@ stdcall D3DXCreateTextureFromFileA(ptr
s
tr ptr)
@ st
dcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr)
@ stdcall D3DXCreateTextureFromFileExW(ptr
ws
tr long long long long long long long long long ptr ptr ptr)
@ st
dcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr)
@ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr)
@ st
ub D3DXCreateTextureFromFileW
@ st
dcall D3DXCreateTextureFromFileW(ptr wstr ptr)
@ stub D3DXCreateTextureFromResourceA
@ stub D3DXCreateTextureFromResourceExA
@ stub D3DXCreateTextureFromResourceExW
...
...
dlls/d3dx9_36/texture.c
View file @
ae695bdf
...
...
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/unicode.h"
#include "wine/debug.h"
#include "d3dx9_36_private.h"
...
...
@@ -289,6 +290,17 @@ HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 device,
return
E_NOTIMPL
;
}
HRESULT
WINAPI
D3DXCreateTextureFromFileInMemory
(
LPDIRECT3DDEVICE9
device
,
LPCVOID
srcdata
,
UINT
srcdatasize
,
LPDIRECT3DTEXTURE9
*
texture
)
{
TRACE
(
"(%p, %p, %d, %p)
\n
"
,
device
,
srcdata
,
srcdatasize
,
texture
);
return
D3DXCreateTextureFromFileInMemoryEx
(
device
,
srcdata
,
srcdatasize
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
texture
);
}
HRESULT
WINAPI
D3DXCreateTextureFromFileExW
(
LPDIRECT3DDEVICE9
device
,
LPCWSTR
srcfile
,
UINT
width
,
...
...
@@ -326,11 +338,59 @@ HRESULT WINAPI D3DXCreateTextureFromFileExW(LPDIRECT3DDEVICE9 device,
return
hr
;
}
HRESULT
WINAPI
D3DXCreateTextureFromFileExA
(
LPDIRECT3DDEVICE9
device
,
LPCSTR
srcfile
,
UINT
width
,
UINT
height
,
UINT
miplevels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
,
DWORD
filter
,
DWORD
mipfilter
,
D3DCOLOR
colorkey
,
D3DXIMAGE_INFO
*
srcinfo
,
PALETTEENTRY
*
palette
,
LPDIRECT3DTEXTURE9
*
texture
)
{
LPWSTR
widename
;
HRESULT
hr
;
DWORD
len
;
TRACE
(
"(%p, %p, %u, %u, %u, %x, %x, %x, %u, %u, %x, %p, %p, %p): relay
\n
"
,
device
,
debugstr_a
(
srcfile
),
width
,
height
,
miplevels
,
usage
,
format
,
pool
,
filter
,
mipfilter
,
colorkey
,
srcinfo
,
palette
,
texture
);
if
(
!
device
||
!
srcfile
||
!
texture
)
return
D3DERR_INVALIDCALL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
srcfile
,
-
1
,
NULL
,
0
);
widename
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
srcfile
,
-
1
,
widename
,
len
);
hr
=
D3DXCreateTextureFromFileExW
(
device
,
widename
,
width
,
height
,
miplevels
,
usage
,
format
,
pool
,
filter
,
mipfilter
,
colorkey
,
srcinfo
,
palette
,
texture
);
HeapFree
(
GetProcessHeap
(),
0
,
widename
);
return
hr
;
}
HRESULT
WINAPI
D3DXCreateTextureFromFileA
(
LPDIRECT3DDEVICE9
device
,
LPCSTR
srcfile
,
LPDIRECT3DTEXTURE9
*
texture
)
{
FIXME
(
"(%p, %s, %p): stub
\n
"
,
device
,
debugstr_a
(
srcfile
),
texture
);
TRACE
(
"(%p, %s, %p)
\n
"
,
device
,
debugstr_a
(
srcfile
),
texture
);
return
E_NOTIMPL
;
return
D3DXCreateTextureFromFileExA
(
device
,
srcfile
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
texture
);
}
HRESULT
WINAPI
D3DXCreateTextureFromFileW
(
LPDIRECT3DDEVICE9
device
,
LPCWSTR
srcfile
,
LPDIRECT3DTEXTURE9
*
texture
)
{
TRACE
(
"(%p, %s, %p)
\n
"
,
device
,
debugstr_w
(
srcfile
),
texture
);
return
D3DXCreateTextureFromFileExW
(
device
,
srcfile
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
texture
);
}
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