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
ceac557f
Commit
ceac557f
authored
Nov 15, 2008
by
Tony Wasserka
Committed by
Alexandre Julliard
Mar 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: ID3DXSprite: Move vdecl creation to ID3DXSprite_Begin.
parent
f975d4bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
sprite.c
dlls/d3dx9_36/sprite.c
+12
-9
No files found.
dlls/d3dx9_36/sprite.c
View file @
ceac557f
...
...
@@ -225,6 +225,17 @@ D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often)
D3DXSPRITE_DO_NOT_ADDREF_TEXTURE: don't call AddRef/Release on every Draw/Flush call
D3DXSPRITE_DONOTSAVESTATE: don't restore the current device state on ID3DXSprite_End
*/
if
(
This
->
vdecl
==
NULL
)
{
static
const
D3DVERTEXELEMENT9
elements
[]
=
{
{
0
,
0
,
D3DDECLTYPE_FLOAT3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
0
,
12
,
D3DDECLTYPE_D3DCOLOR
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_COLOR
,
0
},
{
0
,
16
,
D3DDECLTYPE_FLOAT2
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_TEXCOORD
,
0
},
D3DDECL_END
()
};
IDirect3DDevice9_CreateVertexDeclaration
(
This
->
device
,
elements
,
&
This
->
vdecl
);
}
if
(
This
->
stateblock
==
NULL
)
{
/* Tell our state block what it must store */
hr
=
IDirect3DDevice9_BeginStateBlock
(
This
->
device
);
...
...
@@ -434,14 +445,6 @@ HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite)
{
ID3DXSpriteImpl
*
object
;
D3DCAPS9
caps
;
static
const
D3DVERTEXELEMENT9
elements
[]
=
{
{
0
,
0
,
D3DDECLTYPE_FLOAT3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
0
,
12
,
D3DDECLTYPE_D3DCOLOR
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_COLOR
,
0
},
{
0
,
16
,
D3DDECLTYPE_FLOAT2
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_TEXCOORD
,
0
},
D3DDECL_END
()
};
TRACE
(
"(void): relay
\n
"
);
if
(
device
==
NULL
||
sprite
==
NULL
)
return
D3DERR_INVALIDCALL
;
...
...
@@ -456,7 +459,7 @@ HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite)
object
->
device
=
device
;
IUnknown_AddRef
(
device
);
IDirect3DDevice9_CreateVertexDeclaration
(
object
->
device
,
elements
,
&
object
->
vdecl
)
;
object
->
vdecl
=
NULL
;
object
->
stateblock
=
NULL
;
D3DXMatrixIdentity
(
&
object
->
transform
);
...
...
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