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
0457333f
Commit
0457333f
authored
Mar 21, 2008
by
Philip Nilsson
Committed by
Alexandre Julliard
Mar 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement the D3DXVec*Array functions.
parent
c0b3af34
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
215 additions
and
10 deletions
+215
-10
Makefile.in
dlls/d3dx9_36/Makefile.in
+2
-1
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+9
-9
math.c
dlls/d3dx9_36/math.c
+195
-0
d3dx9math.h
include/d3dx9math.h
+9
-0
No files found.
dlls/d3dx9_36/Makefile.in
View file @
0457333f
...
...
@@ -8,7 +8,8 @@ IMPORTS = d3d9 d3dx8 kernel32
C_SRCS
=
\
d3dx9_36_main.c
\
font.c
font.c
\
math.c
@MAKE_DLL_RULES@
...
...
dlls/d3dx9_36/d3dx9_36.spec
View file @
0457333f
...
...
@@ -307,30 +307,30 @@
@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx8.D3DXVec2Hermite
@ stdcall D3DXVec2Normalize(ptr ptr) d3dx8.D3DXVec2Normalize
@ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx8.D3DXVec2Transform
@ st
ub D3DXVec2TransformArray
@ st
dcall D3DXVec2TransformArray(ptr long ptr long ptr long)
@ stdcall D3DXVec2TransformCoord(ptr ptr ptr) d3dx8.D3DXVec2TransformCoord
@ st
ub D3DXVec2TransformCoordArray
@ st
dcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long)
@ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx8.D3DXVec2TransformNormal
@ st
ub D3DXVec2TransformNormalArray
@ st
dcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long)
@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx8.D3DXVec3BaryCentric
@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx8.D3DXVec3CatmullRom
@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx8.D3DXVec3Hermite
@ stdcall D3DXVec3Normalize(ptr ptr) d3dx8.D3DXVec3Normalize
@ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx8.D3DXVec3Project
@ st
ub D3DXVec3ProjectArray
@ st
dcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long)
@ stdcall D3DXVec3Transform(ptr ptr ptr) d3dx8.D3DXVec3Transform
@ st
ub D3DXVec3TransformArray
@ st
dcall D3DXVec3TransformArray(ptr long ptr long ptr long)
@ stdcall D3DXVec3TransformCoord(ptr ptr ptr) d3dx8.D3DXVec3TransformCoord
@ st
ub D3DXVec3TransformCoordArray
@ st
dcall D3DXVec3TransformCoordArray(ptr long ptr long ptr long)
@ stdcall D3DXVec3TransformNormal(ptr ptr ptr) d3dx8.D3DXVec3TransformNormal
@ st
ub D3DXVec3TransformNormalArray
@ st
dcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long)
@ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx8.D3DXVec3Unproject
@ st
ub D3DXVec3UnprojectArray
@ st
dcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long)
@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx8.D3DXVec4BaryCentric
@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx8.D3DXVec4CatmullRom
@ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx8.D3DXVec4Cross
@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx8.D3DXVec4Hermite
@ stdcall D3DXVec4Normalize(ptr ptr) d3dx8.D3DXVec4Normalize
@ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx8.D3DXVec4Transform
@ st
ub D3DXVec4TransformArray
@ st
dcall D3DXVec4TransformArray(ptr long ptr long ptr long)
@ stub D3DXWeldVertices
dlls/d3dx9_36/math.c
0 → 100644
View file @
0457333f
/*
* Mathematical operations specific to D3DX9.
*
* Copyright (C) 2008 Philip Nilsson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "windef.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "d3dx9.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
/*************************************************************************
* D3DXVec2TransformArray
*
* Transform an array of vectors by a matrix.
*/
D3DXVECTOR4
*
WINAPI
D3DXVec2TransformArray
(
D3DXVECTOR4
*
out
,
UINT
outstride
,
CONST
D3DXVECTOR2
*
in
,
UINT
instride
,
CONST
D3DXMATRIX
*
matrix
,
UINT
elements
)
{
unsigned
int
i
;
TRACE
(
"
\n
"
);
for
(
i
=
0
;
i
<
elements
;
++
i
)
{
D3DXVec2Transform
(
(
D3DXVECTOR4
*
)((
char
*
)
out
+
outstride
*
i
),
(
CONST
D3DXVECTOR2
*
)((
const
char
*
)
in
+
instride
*
i
),
matrix
);
}
return
out
;
}
/*************************************************************************
* D3DXVec2TransformCoordArray
*/
D3DXVECTOR2
*
WINAPI
D3DXVec2TransformCoordArray
(
D3DXVECTOR2
*
out
,
UINT
outstride
,
CONST
D3DXVECTOR2
*
in
,
UINT
instride
,
CONST
D3DXMATRIX
*
matrix
,
UINT
elements
)
{
unsigned
int
i
;
TRACE
(
"
\n
"
);
for
(
i
=
0
;
i
<
elements
;
++
i
)
{
D3DXVec2TransformCoord
(
(
D3DXVECTOR2
*
)((
char
*
)
out
+
outstride
*
i
),
(
CONST
D3DXVECTOR2
*
)((
const
char
*
)
in
+
instride
*
i
),
matrix
);
}
return
out
;
}
/*************************************************************************
* D3DXVec2TransformNormalArray
*/
D3DXVECTOR2
*
WINAPI
D3DXVec2TransformNormalArray
(
D3DXVECTOR2
*
out
,
UINT
outstride
,
CONST
D3DXVECTOR2
*
in
,
UINT
instride
,
CONST
D3DXMATRIX
*
matrix
,
UINT
elements
)
{
unsigned
int
i
;
TRACE
(
"
\n
"
);
for
(
i
=
0
;
i
<
elements
;
++
i
)
{
D3DXVec2TransformNormal
(
(
D3DXVECTOR2
*
)((
char
*
)
out
+
outstride
*
i
),
(
CONST
D3DXVECTOR2
*
)((
const
char
*
)
in
+
instride
*
i
),
matrix
);
}
return
out
;
}
/*************************************************************************
* D3DXVec3ProjectArray
*
* Projects an array of vectors to the screen.
*/
D3DXVECTOR3
*
WINAPI
D3DXVec3ProjectArray
(
D3DXVECTOR3
*
out
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
in
,
UINT
instride
,
CONST
D3DVIEWPORT9
*
viewport
,
CONST
D3DXMATRIX
*
projection
,
CONST
D3DXMATRIX
*
view
,
CONST
D3DXMATRIX
*
world
,
UINT
elements
)
{
unsigned
int
i
;
TRACE
(
"
\n
"
);
for
(
i
=
0
;
i
<
elements
;
++
i
)
{
D3DXVec3Project
(
(
D3DXVECTOR3
*
)((
char
*
)
out
+
outstride
*
i
),
(
CONST
D3DXVECTOR3
*
)((
const
char
*
)
in
+
instride
*
i
),
viewport
,
projection
,
view
,
world
);
}
return
out
;
}
/*************************************************************************
* D3DXVec3TransformArray
*/
D3DXVECTOR4
*
WINAPI
D3DXVec3TransformArray
(
D3DXVECTOR4
*
out
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
in
,
UINT
instride
,
CONST
D3DXMATRIX
*
matrix
,
UINT
elements
)
{
unsigned
int
i
;
TRACE
(
"
\n
"
);
for
(
i
=
0
;
i
<
elements
;
++
i
)
{
D3DXVec3Transform
(
(
D3DXVECTOR4
*
)((
char
*
)
out
+
outstride
*
i
),
(
CONST
D3DXVECTOR3
*
)((
const
char
*
)
in
+
instride
*
i
),
matrix
);
}
return
out
;
}
/*************************************************************************
* D3DXVec3TransformCoordArray
*/
D3DXVECTOR3
*
WINAPI
D3DXVec3TransformCoordArray
(
D3DXVECTOR3
*
out
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
in
,
UINT
instride
,
CONST
D3DXMATRIX
*
matrix
,
UINT
elements
)
{
unsigned
int
i
;
TRACE
(
"
\n
"
);
for
(
i
=
0
;
i
<
elements
;
++
i
)
{
D3DXVec3TransformCoord
(
(
D3DXVECTOR3
*
)((
char
*
)
out
+
outstride
*
i
),
(
CONST
D3DXVECTOR3
*
)((
const
char
*
)
in
+
instride
*
i
),
matrix
);
}
return
out
;
}
/*************************************************************************
* D3DXVec3TransformNormalArray
*/
D3DXVECTOR3
*
WINAPI
D3DXVec3TransformNormalArray
(
D3DXVECTOR3
*
out
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
in
,
UINT
instride
,
CONST
D3DXMATRIX
*
matrix
,
UINT
elements
)
{
unsigned
int
i
;
TRACE
(
"
\n
"
);
for
(
i
=
0
;
i
<
elements
;
++
i
)
{
D3DXVec3TransformNormal
(
(
D3DXVECTOR3
*
)((
char
*
)
out
+
outstride
*
i
),
(
CONST
D3DXVECTOR3
*
)((
const
char
*
)
in
+
instride
*
i
),
matrix
);
}
return
out
;
}
/*************************************************************************
* D3DXVec3UnprojectArray
*/
D3DXVECTOR3
*
WINAPI
D3DXVec3UnprojectArray
(
D3DXVECTOR3
*
out
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
in
,
UINT
instride
,
CONST
D3DVIEWPORT9
*
viewport
,
CONST
D3DXMATRIX
*
projection
,
CONST
D3DXMATRIX
*
view
,
CONST
D3DXMATRIX
*
world
,
UINT
elements
)
{
unsigned
int
i
;
TRACE
(
"
\n
"
);
for
(
i
=
0
;
i
<
elements
;
++
i
)
{
D3DXVec3Unproject
(
(
D3DXVECTOR3
*
)((
char
*
)
out
+
outstride
*
i
),
(
CONST
D3DXVECTOR3
*
)((
const
char
*
)
in
+
instride
*
i
),
viewport
,
projection
,
view
,
world
);
}
return
out
;
}
/*************************************************************************
* D3DXVec4TransformArray
*/
D3DXVECTOR4
*
WINAPI
D3DXVec4TransformArray
(
D3DXVECTOR4
*
out
,
UINT
outstride
,
CONST
D3DXVECTOR4
*
in
,
UINT
instride
,
CONST
D3DXMATRIX
*
matrix
,
UINT
elements
)
{
unsigned
int
i
;
TRACE
(
"
\n
"
);
for
(
i
=
0
;
i
<
elements
;
++
i
)
{
D3DXVec4Transform
(
(
D3DXVECTOR4
*
)((
char
*
)
out
+
outstride
*
i
),
(
CONST
D3DXVECTOR4
*
)((
const
char
*
)
in
+
instride
*
i
),
matrix
);
}
return
out
;
}
include/d3dx9math.h
View file @
0457333f
...
...
@@ -321,18 +321,26 @@ D3DXVECTOR2* WINAPI D3DXVec2CatmullRom(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv0
D3DXVECTOR2
*
WINAPI
D3DXVec2Hermite
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv1
,
CONST
D3DXVECTOR2
*
pt1
,
CONST
D3DXVECTOR2
*
pv2
,
CONST
D3DXVECTOR2
*
pt2
,
FLOAT
s
);
D3DXVECTOR2
*
WINAPI
D3DXVec2Normalize
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv
);
D3DXVECTOR4
*
WINAPI
D3DXVec2Transform
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR2
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR4
*
WINAPI
D3DXVec2TransformArray
(
D3DXVECTOR4
*
pout
,
UINT
outstride
,
CONST
D3DXVECTOR2
*
pv
,
UINT
vstride
,
CONST
D3DXMATRIX
*
pm
,
UINT
n
);
D3DXVECTOR2
*
WINAPI
D3DXVec2TransformCoord
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR2
*
WINAPI
D3DXVec2TransformCoordArray
(
D3DXVECTOR2
*
pout
,
UINT
outstride
,
CONST
D3DXVECTOR2
*
pv
,
UINT
vstride
,
CONST
D3DXMATRIX
*
pm
,
UINT
n
);
D3DXVECTOR2
*
WINAPI
D3DXVec2TransformNormal
(
D3DXVECTOR2
*
pout
,
CONST
D3DXVECTOR2
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR2
*
WINAPI
D3DXVec2TransformNormalArray
(
D3DXVECTOR2
*
pout
,
UINT
outstride
,
CONST
D3DXVECTOR2
*
pv
,
UINT
vstride
,
CONST
D3DXMATRIX
*
pm
,
UINT
n
);
D3DXVECTOR3
*
WINAPI
D3DXVec3BaryCentric
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv1
,
CONST
D3DXVECTOR3
*
pv2
,
CONST
D3DXVECTOR3
*
pv3
,
FLOAT
f
,
FLOAT
g
);
D3DXVECTOR3
*
WINAPI
D3DXVec3CatmullRom
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv0
,
CONST
D3DXVECTOR3
*
pv1
,
CONST
D3DXVECTOR3
*
pv2
,
CONST
D3DXVECTOR3
*
pv3
,
FLOAT
s
);
D3DXVECTOR3
*
WINAPI
D3DXVec3Hermite
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv1
,
CONST
D3DXVECTOR3
*
pt1
,
CONST
D3DXVECTOR3
*
pv2
,
CONST
D3DXVECTOR3
*
pt2
,
FLOAT
s
);
D3DXVECTOR3
*
WINAPI
D3DXVec3Normalize
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
);
D3DXVECTOR3
*
WINAPI
D3DXVec3Project
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DVIEWPORT9
*
pviewport
,
CONST
D3DXMATRIX
*
pprojection
,
CONST
D3DXMATRIX
*
pview
,
CONST
D3DXMATRIX
*
pworld
);
D3DXVECTOR3
*
WINAPI
D3DXVec3ProjectArray
(
D3DXVECTOR3
*
pout
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
pv
,
UINT
vstride
,
CONST
D3DVIEWPORT9
*
pviewport
,
CONST
D3DXMATRIX
*
pprojection
,
CONST
D3DXMATRIX
*
pview
,
CONST
D3DXMATRIX
*
pworld
,
UINT
n
);
D3DXVECTOR4
*
WINAPI
D3DXVec3Transform
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR4
*
WINAPI
D3DXVec3TransformArray
(
D3DXVECTOR4
*
pout
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
pv
,
UINT
vstride
,
CONST
D3DXMATRIX
*
pm
,
UINT
n
);
D3DXVECTOR3
*
WINAPI
D3DXVec3TransformCoord
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR3
*
WINAPI
D3DXVec3TransformCoordArray
(
D3DXVECTOR3
*
pout
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
pv
,
UINT
vstride
,
CONST
D3DXMATRIX
*
pm
,
UINT
n
);
D3DXVECTOR3
*
WINAPI
D3DXVec3TransformNormal
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR3
*
WINAPI
D3DXVec3TransformNormalArray
(
D3DXVECTOR3
*
pout
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
pv
,
UINT
vstride
,
CONST
D3DXMATRIX
*
pm
,
UINT
n
);
D3DXVECTOR3
*
WINAPI
D3DXVec3Unproject
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DVIEWPORT9
*
pviewport
,
CONST
D3DXMATRIX
*
pprojection
,
CONST
D3DXMATRIX
*
pview
,
CONST
D3DXMATRIX
*
pworld
);
D3DXVECTOR3
*
WINAPI
D3DXVec3UnprojectArray
(
D3DXVECTOR3
*
pout
,
UINT
outstride
,
CONST
D3DXVECTOR3
*
pv
,
UINT
vstride
,
CONST
D3DVIEWPORT9
*
pviewport
,
CONST
D3DXMATRIX
*
pprojection
,
CONST
D3DXMATRIX
*
pview
,
CONST
D3DXMATRIX
*
pworld
,
UINT
n
);
D3DXVECTOR4
*
WINAPI
D3DXVec4BaryCentric
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR4
*
pv1
,
CONST
D3DXVECTOR4
*
pv2
,
CONST
D3DXVECTOR4
*
pv3
,
FLOAT
f
,
FLOAT
g
);
D3DXVECTOR4
*
WINAPI
D3DXVec4CatmullRom
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR4
*
pv0
,
CONST
D3DXVECTOR4
*
pv1
,
CONST
D3DXVECTOR4
*
pv2
,
CONST
D3DXVECTOR4
*
pv3
,
FLOAT
s
);
...
...
@@ -340,6 +348,7 @@ D3DXVECTOR4* WINAPI D3DXVec4Cross(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv1, CON
D3DXVECTOR4
*
WINAPI
D3DXVec4Hermite
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR4
*
pv1
,
CONST
D3DXVECTOR4
*
pt1
,
CONST
D3DXVECTOR4
*
pv2
,
CONST
D3DXVECTOR4
*
pt2
,
FLOAT
s
);
D3DXVECTOR4
*
WINAPI
D3DXVec4Normalize
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR4
*
pv
);
D3DXVECTOR4
*
WINAPI
D3DXVec4Transform
(
D3DXVECTOR4
*
pout
,
CONST
D3DXVECTOR4
*
pv
,
CONST
D3DXMATRIX
*
pm
);
D3DXVECTOR4
*
WINAPI
D3DXVec4TransformArray
(
D3DXVECTOR4
*
pout
,
UINT
outstride
,
CONST
D3DXVECTOR4
*
pv
,
UINT
vstride
,
CONST
D3DXMATRIX
*
pm
,
UINT
n
);
#ifdef __cplusplus
}
...
...
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