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
78bd619c
Commit
78bd619c
authored
Sep 08, 2010
by
Owen Rudge
Committed by
Alexandre Julliard
Sep 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement D3DXCreateTextureFromResource*.
parent
e8816357
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
4 deletions
+135
-4
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+4
-4
texture.c
dlls/d3dx9_36/texture.c
+131
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
78bd619c
...
@@ -99,10 +99,10 @@
...
@@ -99,10 +99,10 @@
@ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr)
@ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr)
@ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr)
@ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr)
@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr)
@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr)
@ st
ub D3DXCreateTextureFromResourceA
@ st
dcall D3DXCreateTextureFromResourceA(ptr ptr str ptr)
@ st
ub D3DXCreateTextureFromResourceExA
@ st
dcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr)
@ st
ub D3DXCreateTextureFromResourceExW
@ st
dcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr)
@ st
ub D3DXCreateTextureFromResourceW
@ st
dcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr)
@ stub D3DXCreateTextureGutterHelper
@ stub D3DXCreateTextureGutterHelper
@ stub D3DXCreateTextureShader
@ stub D3DXCreateTextureShader
@ stub D3DXCreateTorus
@ stub D3DXCreateTorus
...
...
dlls/d3dx9_36/texture.c
View file @
78bd619c
...
@@ -533,3 +533,134 @@ HRESULT WINAPI D3DXCreateTextureFromFileW(LPDIRECT3DDEVICE9 device,
...
@@ -533,3 +533,134 @@ HRESULT WINAPI D3DXCreateTextureFromFileW(LPDIRECT3DDEVICE9 device,
return
D3DXCreateTextureFromFileExW
(
device
,
srcfile
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
return
D3DXCreateTextureFromFileExW
(
device
,
srcfile
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
texture
);
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
texture
);
}
}
HRESULT
WINAPI
D3DXCreateTextureFromResourceA
(
LPDIRECT3DDEVICE9
device
,
HMODULE
srcmodule
,
LPCSTR
resource
,
LPDIRECT3DTEXTURE9
*
texture
)
{
TRACE
(
"(%p, %s): relay
\n
"
,
srcmodule
,
debugstr_a
(
resource
));
return
D3DXCreateTextureFromResourceExA
(
device
,
srcmodule
,
resource
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
texture
);
}
HRESULT
WINAPI
D3DXCreateTextureFromResourceW
(
LPDIRECT3DDEVICE9
device
,
HMODULE
srcmodule
,
LPCWSTR
resource
,
LPDIRECT3DTEXTURE9
*
texture
)
{
TRACE
(
"(%p, %s): relay
\n
"
,
srcmodule
,
debugstr_w
(
resource
));
return
D3DXCreateTextureFromResourceExW
(
device
,
srcmodule
,
resource
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
texture
);
}
HRESULT
WINAPI
D3DXCreateTextureFromResourceExA
(
LPDIRECT3DDEVICE9
device
,
HMODULE
srcmodule
,
LPCSTR
resource
,
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
)
{
HRSRC
resinfo
;
TRACE
(
"(%p, %s): relay
\n
"
,
srcmodule
,
debugstr_a
(
resource
));
if
(
!
device
||
!
texture
)
return
D3DERR_INVALIDCALL
;
resinfo
=
FindResourceA
(
srcmodule
,
resource
,
(
LPCSTR
)
RT_RCDATA
);
if
(
resinfo
)
{
LPVOID
buffer
;
HRESULT
hr
;
DWORD
size
;
hr
=
load_resource_into_memory
(
srcmodule
,
resinfo
,
&
buffer
,
&
size
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
return
D3DXCreateTextureFromFileInMemoryEx
(
device
,
buffer
,
size
,
width
,
height
,
miplevels
,
usage
,
format
,
pool
,
filter
,
mipfilter
,
colorkey
,
srcinfo
,
palette
,
texture
);
}
/* Try loading the resource as bitmap data */
resinfo
=
FindResourceA
(
srcmodule
,
resource
,
(
LPCSTR
)
RT_BITMAP
);
if
(
resinfo
)
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
HRESULT
WINAPI
D3DXCreateTextureFromResourceExW
(
LPDIRECT3DDEVICE9
device
,
HMODULE
srcmodule
,
LPCWSTR
resource
,
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
)
{
HRSRC
resinfo
;
TRACE
(
"(%p, %s): relay
\n
"
,
srcmodule
,
debugstr_w
(
resource
));
if
(
!
device
||
!
texture
)
return
D3DERR_INVALIDCALL
;
resinfo
=
FindResourceW
(
srcmodule
,
resource
,
(
LPCWSTR
)
RT_RCDATA
);
if
(
resinfo
)
{
LPVOID
buffer
;
HRESULT
hr
;
DWORD
size
;
hr
=
load_resource_into_memory
(
srcmodule
,
resinfo
,
&
buffer
,
&
size
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
return
D3DXCreateTextureFromFileInMemoryEx
(
device
,
buffer
,
size
,
width
,
height
,
miplevels
,
usage
,
format
,
pool
,
filter
,
mipfilter
,
colorkey
,
srcinfo
,
palette
,
texture
);
}
/* Try loading the resource as bitmap data */
resinfo
=
FindResourceW
(
srcmodule
,
resource
,
(
LPCWSTR
)
RT_BITMAP
);
if
(
resinfo
)
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
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