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
9abdac6a
Commit
9abdac6a
authored
May 12, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement IWineD3DDevice::ProcessVertices.
parent
a9886585
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
1 deletion
+62
-1
device.c
dlls/wined3d/device.c
+0
-0
drawprim.c
dlls/wined3d/drawprim.c
+1
-1
utils.c
dlls/wined3d/utils.c
+50
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+11
-0
No files found.
dlls/wined3d/device.c
View file @
9abdac6a
This diff is collapsed.
Click to expand it.
dlls/wined3d/drawprim.c
View file @
9abdac6a
...
@@ -557,7 +557,7 @@ void primitiveDeclarationConvertToStridedData(IWineD3DDevice *iface, BOOL useVer
...
@@ -557,7 +557,7 @@ void primitiveDeclarationConvertToStridedData(IWineD3DDevice *iface, BOOL useVer
}
}
static
void
primitiveConvertToStridedData
(
IWineD3DDevice
*
iface
,
WineDirect3DVertexStridedData
*
strided
,
LONG
BaseVertexIndex
)
{
void
primitiveConvertToStridedData
(
IWineD3DDevice
*
iface
,
WineDirect3DVertexStridedData
*
strided
,
LONG
BaseVertexIndex
)
{
short
LoopThroughTo
=
0
;
short
LoopThroughTo
=
0
;
short
nStream
;
short
nStream
;
...
...
dlls/wined3d/utils.c
View file @
9abdac6a
...
@@ -2242,3 +2242,53 @@ LONG get_bitmask_alpha(WINED3DFORMAT fmt)
...
@@ -2242,3 +2242,53 @@ LONG get_bitmask_alpha(WINED3DFORMAT fmt)
}
}
}
}
void
multiply_matrix
(
D3DMATRIX
*
dest
,
D3DMATRIX
*
src1
,
D3DMATRIX
*
src2
)
{
D3DMATRIX
temp
;
/* Now do the multiplication 'by hand'.
I know that all this could be optimised, but this will be done later :-) */
temp
.
u
.
s
.
_11
=
(
src1
->
u
.
s
.
_11
*
src2
->
u
.
s
.
_11
)
+
(
src1
->
u
.
s
.
_21
*
src2
->
u
.
s
.
_12
)
+
(
src1
->
u
.
s
.
_31
*
src2
->
u
.
s
.
_13
)
+
(
src1
->
u
.
s
.
_41
*
src2
->
u
.
s
.
_14
);
temp
.
u
.
s
.
_21
=
(
src1
->
u
.
s
.
_11
*
src2
->
u
.
s
.
_21
)
+
(
src1
->
u
.
s
.
_21
*
src2
->
u
.
s
.
_22
)
+
(
src1
->
u
.
s
.
_31
*
src2
->
u
.
s
.
_23
)
+
(
src1
->
u
.
s
.
_41
*
src2
->
u
.
s
.
_24
);
temp
.
u
.
s
.
_31
=
(
src1
->
u
.
s
.
_11
*
src2
->
u
.
s
.
_31
)
+
(
src1
->
u
.
s
.
_21
*
src2
->
u
.
s
.
_32
)
+
(
src1
->
u
.
s
.
_31
*
src2
->
u
.
s
.
_33
)
+
(
src1
->
u
.
s
.
_41
*
src2
->
u
.
s
.
_34
);
temp
.
u
.
s
.
_41
=
(
src1
->
u
.
s
.
_11
*
src2
->
u
.
s
.
_41
)
+
(
src1
->
u
.
s
.
_21
*
src2
->
u
.
s
.
_42
)
+
(
src1
->
u
.
s
.
_31
*
src2
->
u
.
s
.
_43
)
+
(
src1
->
u
.
s
.
_41
*
src2
->
u
.
s
.
_44
);
temp
.
u
.
s
.
_12
=
(
src1
->
u
.
s
.
_12
*
src2
->
u
.
s
.
_11
)
+
(
src1
->
u
.
s
.
_22
*
src2
->
u
.
s
.
_12
)
+
(
src1
->
u
.
s
.
_32
*
src2
->
u
.
s
.
_13
)
+
(
src1
->
u
.
s
.
_42
*
src2
->
u
.
s
.
_14
);
temp
.
u
.
s
.
_22
=
(
src1
->
u
.
s
.
_12
*
src2
->
u
.
s
.
_21
)
+
(
src1
->
u
.
s
.
_22
*
src2
->
u
.
s
.
_22
)
+
(
src1
->
u
.
s
.
_32
*
src2
->
u
.
s
.
_23
)
+
(
src1
->
u
.
s
.
_42
*
src2
->
u
.
s
.
_24
);
temp
.
u
.
s
.
_32
=
(
src1
->
u
.
s
.
_12
*
src2
->
u
.
s
.
_31
)
+
(
src1
->
u
.
s
.
_22
*
src2
->
u
.
s
.
_32
)
+
(
src1
->
u
.
s
.
_32
*
src2
->
u
.
s
.
_33
)
+
(
src1
->
u
.
s
.
_42
*
src2
->
u
.
s
.
_34
);
temp
.
u
.
s
.
_42
=
(
src1
->
u
.
s
.
_12
*
src2
->
u
.
s
.
_41
)
+
(
src1
->
u
.
s
.
_22
*
src2
->
u
.
s
.
_42
)
+
(
src1
->
u
.
s
.
_32
*
src2
->
u
.
s
.
_43
)
+
(
src1
->
u
.
s
.
_42
*
src2
->
u
.
s
.
_44
);
temp
.
u
.
s
.
_13
=
(
src1
->
u
.
s
.
_13
*
src2
->
u
.
s
.
_11
)
+
(
src1
->
u
.
s
.
_23
*
src2
->
u
.
s
.
_12
)
+
(
src1
->
u
.
s
.
_33
*
src2
->
u
.
s
.
_13
)
+
(
src1
->
u
.
s
.
_43
*
src2
->
u
.
s
.
_14
);
temp
.
u
.
s
.
_23
=
(
src1
->
u
.
s
.
_13
*
src2
->
u
.
s
.
_21
)
+
(
src1
->
u
.
s
.
_23
*
src2
->
u
.
s
.
_22
)
+
(
src1
->
u
.
s
.
_33
*
src2
->
u
.
s
.
_23
)
+
(
src1
->
u
.
s
.
_43
*
src2
->
u
.
s
.
_24
);
temp
.
u
.
s
.
_33
=
(
src1
->
u
.
s
.
_13
*
src2
->
u
.
s
.
_31
)
+
(
src1
->
u
.
s
.
_23
*
src2
->
u
.
s
.
_32
)
+
(
src1
->
u
.
s
.
_33
*
src2
->
u
.
s
.
_33
)
+
(
src1
->
u
.
s
.
_43
*
src2
->
u
.
s
.
_34
);
temp
.
u
.
s
.
_43
=
(
src1
->
u
.
s
.
_13
*
src2
->
u
.
s
.
_41
)
+
(
src1
->
u
.
s
.
_23
*
src2
->
u
.
s
.
_42
)
+
(
src1
->
u
.
s
.
_33
*
src2
->
u
.
s
.
_43
)
+
(
src1
->
u
.
s
.
_43
*
src2
->
u
.
s
.
_44
);
temp
.
u
.
s
.
_14
=
(
src1
->
u
.
s
.
_14
*
src2
->
u
.
s
.
_11
)
+
(
src1
->
u
.
s
.
_24
*
src2
->
u
.
s
.
_12
)
+
(
src1
->
u
.
s
.
_34
*
src2
->
u
.
s
.
_13
)
+
(
src1
->
u
.
s
.
_44
*
src2
->
u
.
s
.
_14
);
temp
.
u
.
s
.
_24
=
(
src1
->
u
.
s
.
_14
*
src2
->
u
.
s
.
_21
)
+
(
src1
->
u
.
s
.
_24
*
src2
->
u
.
s
.
_22
)
+
(
src1
->
u
.
s
.
_34
*
src2
->
u
.
s
.
_23
)
+
(
src1
->
u
.
s
.
_44
*
src2
->
u
.
s
.
_24
);
temp
.
u
.
s
.
_34
=
(
src1
->
u
.
s
.
_14
*
src2
->
u
.
s
.
_31
)
+
(
src1
->
u
.
s
.
_24
*
src2
->
u
.
s
.
_32
)
+
(
src1
->
u
.
s
.
_34
*
src2
->
u
.
s
.
_33
)
+
(
src1
->
u
.
s
.
_44
*
src2
->
u
.
s
.
_34
);
temp
.
u
.
s
.
_44
=
(
src1
->
u
.
s
.
_14
*
src2
->
u
.
s
.
_41
)
+
(
src1
->
u
.
s
.
_24
*
src2
->
u
.
s
.
_42
)
+
(
src1
->
u
.
s
.
_34
*
src2
->
u
.
s
.
_43
)
+
(
src1
->
u
.
s
.
_44
*
src2
->
u
.
s
.
_44
);
/* And copy the new matrix in the good storage.. */
memcpy
(
dest
,
&
temp
,
16
*
sizeof
(
float
));
}
DWORD
get_flexible_vertex_size
(
DWORD
d3dvtVertexType
)
{
DWORD
size
=
0
;
int
i
;
int
numTextures
=
(
d3dvtVertexType
&
D3DFVF_TEXCOUNT_MASK
)
>>
D3DFVF_TEXCOUNT_SHIFT
;
if
(
d3dvtVertexType
&
D3DFVF_NORMAL
)
size
+=
3
*
sizeof
(
float
);
if
(
d3dvtVertexType
&
D3DFVF_DIFFUSE
)
size
+=
sizeof
(
DWORD
);
if
(
d3dvtVertexType
&
D3DFVF_SPECULAR
)
size
+=
sizeof
(
DWORD
);
if
(
d3dvtVertexType
&
D3DFVF_PSIZE
)
size
+=
sizeof
(
DWORD
);
switch
(
d3dvtVertexType
&
D3DFVF_POSITION_MASK
)
{
case
D3DFVF_XYZ
:
size
+=
3
*
sizeof
(
float
);
break
;
case
D3DFVF_XYZRHW
:
size
+=
4
*
sizeof
(
float
);
break
;
default
:
TRACE
(
" matrix weighting not handled yet...
\n
"
);
}
for
(
i
=
0
;
i
<
numTextures
;
i
++
)
{
size
+=
GET_TEXCOORD_SIZE_FROM_FVF
(
d3dvtVertexType
,
i
)
*
sizeof
(
float
);
}
return
size
;
}
dlls/wined3d/wined3d_private.h
View file @
9abdac6a
...
@@ -378,8 +378,17 @@ void drawPrimitive(IWineD3DDevice *iface,
...
@@ -378,8 +378,17 @@ void drawPrimitive(IWineD3DDevice *iface,
int
minIndex
,
int
minIndex
,
WineDirect3DVertexStridedData
*
DrawPrimStrideData
);
WineDirect3DVertexStridedData
*
DrawPrimStrideData
);
void
primitiveConvertToStridedData
(
IWineD3DDevice
*
iface
,
WineDirect3DVertexStridedData
*
strided
,
LONG
BaseVertexIndex
);
DWORD
get_flexible_vertex_size
(
DWORD
d3dvtVertexType
);
#define eps 1e-8
#define eps 1e-8
#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \
(((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
/* Routine to fill gl caps for swapchains and IWineD3D */
/* Routine to fill gl caps for swapchains and IWineD3D */
BOOL
IWineD3DImpl_FillGLCaps
(
WineD3D_GL_Info
*
gl_info
,
BOOL
IWineD3DImpl_FillGLCaps
(
WineD3D_GL_Info
*
gl_info
,
Display
*
display
);
Display
*
display
);
...
@@ -1137,6 +1146,8 @@ GLint D3DFmt2GLIntFmt(IWineD3DDeviceImpl* This, D3DFORMAT fmt);
...
@@ -1137,6 +1146,8 @@ GLint D3DFmt2GLIntFmt(IWineD3DDeviceImpl* This, D3DFORMAT fmt);
int
D3DFmtMakeGlCfg
(
D3DFORMAT
BackBufferFormat
,
D3DFORMAT
StencilBufferFormat
,
int
*
attribs
,
int
*
nAttribs
,
BOOL
alternate
);
int
D3DFmtMakeGlCfg
(
D3DFORMAT
BackBufferFormat
,
D3DFORMAT
StencilBufferFormat
,
int
*
attribs
,
int
*
nAttribs
,
BOOL
alternate
);
/* Math utils */
void
multiply_matrix
(
D3DMATRIX
*
dest
,
D3DMATRIX
*
src1
,
D3DMATRIX
*
src2
);
/*****************************************************************************
/*****************************************************************************
* To enable calling of inherited functions, requires prototypes
* To enable calling of inherited functions, requires prototypes
...
...
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