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
5a5af75f
Commit
5a5af75f
authored
Sep 01, 2010
by
Matteo Bruni
Committed by
Alexandre Julliard
Sep 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement D3DXCompileShaderFromResource.
parent
de8f35bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
shader.c
dlls/d3dx9_36/shader.c
+46
-0
No files found.
dlls/d3dx9_36/shader.c
View file @
5a5af75f
...
@@ -458,6 +458,52 @@ HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
...
@@ -458,6 +458,52 @@ HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
return
hr
;
return
hr
;
}
}
HRESULT
WINAPI
D3DXCompileShaderFromResourceA
(
HMODULE
module
,
LPCSTR
resource
,
CONST
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
LPCSTR
entrypoint
,
LPCSTR
profile
,
DWORD
flags
,
LPD3DXBUFFER
*
shader
,
LPD3DXBUFFER
*
error_messages
,
LPD3DXCONSTANTTABLE
*
constant_table
)
{
HRSRC
res
;
LPCSTR
buffer
;
DWORD
len
;
if
(
!
(
res
=
FindResourceA
(
module
,
resource
,
(
LPCSTR
)
RT_RCDATA
)))
return
D3DXERR_INVALIDDATA
;
if
(
FAILED
(
load_resource_into_memory
(
module
,
res
,
(
LPVOID
*
)
&
buffer
,
&
len
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXCompileShader
(
buffer
,
len
,
defines
,
include
,
entrypoint
,
profile
,
flags
,
shader
,
error_messages
,
constant_table
);
}
HRESULT
WINAPI
D3DXCompileShaderFromResourceW
(
HMODULE
module
,
LPCWSTR
resource
,
CONST
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
LPCSTR
entrypoint
,
LPCSTR
profile
,
DWORD
flags
,
LPD3DXBUFFER
*
shader
,
LPD3DXBUFFER
*
error_messages
,
LPD3DXCONSTANTTABLE
*
constant_table
)
{
HRSRC
res
;
LPCSTR
buffer
;
DWORD
len
;
if
(
!
(
res
=
FindResourceW
(
module
,
resource
,
(
LPCWSTR
)
RT_RCDATA
)))
return
D3DXERR_INVALIDDATA
;
if
(
FAILED
(
load_resource_into_memory
(
module
,
res
,
(
LPVOID
*
)
&
buffer
,
&
len
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXCompileShader
(
buffer
,
len
,
defines
,
include
,
entrypoint
,
profile
,
flags
,
shader
,
error_messages
,
constant_table
);
}
static
const
struct
ID3DXConstantTableVtbl
ID3DXConstantTable_Vtbl
;
static
const
struct
ID3DXConstantTableVtbl
ID3DXConstantTable_Vtbl
;
typedef
struct
ID3DXConstantTableImpl
{
typedef
struct
ID3DXConstantTableImpl
{
...
...
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