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
0023ddf1
Commit
0023ddf1
authored
Jun 08, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Jun 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Handle texture associated with the material when loading a mesh.
parent
422d57e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
meshbuilder.c
dlls/d3drm/meshbuilder.c
+57
-0
No files found.
dlls/d3drm/meshbuilder.c
View file @
0023ddf1
...
...
@@ -1248,6 +1248,7 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
LPDIRECTXFILEDATA
data
;
LPDIRECTXFILEDATAREFERENCE
reference
;
LPDIRECT3DRMMATERIAL2
material
;
LPDIRECTXFILEOBJECT
material_child
;
hr
=
IDirectXFileObject_QueryInterface
(
child
,
&
IID_IDirectXFileData
,
(
void
**
)
&
data
);
if
(
FAILED
(
hr
))
...
...
@@ -1290,6 +1291,62 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
This
->
material
=
material
;
hr
=
IDirectXFileData_GetNextObject
(
data
,
&
material_child
);
if
(
hr
==
S_OK
)
{
LPDIRECTXFILEDATA
data
;
LPDIRECT3DRMTEXTURE3
texture
;
char
**
filename
;
hr
=
IDirectXFileObject_QueryInterface
(
material_child
,
&
IID_IDirectXFileData
,
(
void
**
)
&
data
);
if
(
FAILED
(
hr
))
{
LPDIRECTXFILEDATAREFERENCE
reference
;
hr
=
IDirectXFileObject_QueryInterface
(
material_child
,
&
IID_IDirectXFileDataReference
,
(
void
**
)
&
reference
);
if
(
FAILED
(
hr
))
goto
end
;
hr
=
IDirectXFileDataReference_Resolve
(
reference
,
&
data
);
IDirectXFileDataReference_Release
(
reference
);
if
(
FAILED
(
hr
))
goto
end
;
}
hr
=
IDirectXFileData_GetType
(
data
,
&
pGuid
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
if
(
!
IsEqualGUID
(
pGuid
,
&
TID_D3DRMTextureFilename
))
{
WARN
(
"Not a texture filename
\n
"
);
goto
end
;
}
size
=
4
;
hr
=
IDirectXFileData_GetData
(
data
,
NULL
,
&
size
,
(
void
**
)
&
filename
);
if
(
SUCCEEDED
(
hr
))
{
HANDLE
file
;
file
=
CreateFileA
(
*
filename
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
hr
=
Direct3DRMTexture_create
(
&
IID_IDirect3DRMTexture3
,
(
LPUNKNOWN
*
)
&
texture
);
if
(
FAILED
(
hr
))
{
IDirectXFileData_Release
(
data
);
goto
end
;
}
This
->
texture
=
texture
;
}
}
}
else
if
(
hr
!=
DXFILEERR_NOMOREOBJECTS
)
{
goto
end
;
}
hr
=
S_OK
;
IDirectXFileData_Release
(
data
);
i
++
;
}
...
...
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