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
19e6bf96
Commit
19e6bf96
authored
Feb 12, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Feb 12, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the dwStartVertex argument in the Draw*PrimitiveVB methods.
parent
b307e6a7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
22 deletions
+23
-22
d3d_private.h
dlls/ddraw/d3d_private.h
+1
-1
d3dcommon.c
dlls/ddraw/d3dcommon.c
+4
-1
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+17
-19
d3dvertexbuffer.c
dlls/ddraw/d3dvertexbuffer.c
+1
-1
No files found.
dlls/ddraw/d3d_private.h
View file @
19e6bf96
...
...
@@ -274,7 +274,7 @@ extern void dump_D3DMATRIX(D3DMATRIX *mat);
extern
void
dump_D3DVECTOR
(
D3DVECTOR
*
lpVec
);
extern
void
dump_flexible_vertex
(
DWORD
d3dvtVertexType
);
extern
DWORD
get_flexible_vertex_size
(
DWORD
d3dvtVertexType
);
extern
void
convert_FVF_to_strided_data
(
DWORD
d3dvtVertexType
,
LPVOID
lpvVertices
,
D3DDRAWPRIMITIVESTRIDEDDATA
*
strided
);
extern
void
convert_FVF_to_strided_data
(
DWORD
d3dvtVertexType
,
LPVOID
lpvVertices
,
D3DDRAWPRIMITIVESTRIDEDDATA
*
strided
,
DWORD
dwStartVertex
);
extern
void
dump_D3DVOP
(
DWORD
dwVertexOp
);
extern
void
dump_D3DPV
(
DWORD
dwFlags
);
...
...
dlls/ddraw/d3dcommon.c
View file @
19e6bf96
...
...
@@ -291,10 +291,13 @@ void dump_flexible_vertex(DWORD d3dvtVertexType)
}
void
convert_FVF_to_strided_data
(
DWORD
d3dvtVertexType
,
LPVOID
lpvVertices
,
D3DDRAWPRIMITIVESTRIDEDDATA
*
strided
)
convert_FVF_to_strided_data
(
DWORD
d3dvtVertexType
,
LPVOID
lpvVertices
,
D3DDRAWPRIMITIVESTRIDEDDATA
*
strided
,
DWORD
dwStartVertex
)
{
int
current_offset
=
0
;
int
tex_index
;
int
size
=
get_flexible_vertex_size
(
d3dvtVertexType
);
lpvVertices
=
((
BYTE
*
)
lpvVertices
)
+
(
size
*
dwStartVertex
);
if
((
d3dvtVertexType
&
D3DFVF_POSITION_MASK
)
==
D3DFVF_XYZ
)
{
strided
->
position
.
lpvData
=
lpvVertices
;
...
...
dlls/ddraw/d3ddevice/mesa.c
View file @
19e6bf96
...
...
@@ -65,7 +65,6 @@ static void draw_primitive_strided(IDirect3DDeviceImpl *This,
D3DPRIMITIVETYPE
d3dptPrimitiveType
,
DWORD
d3dvtVertexType
,
LPD3DDRAWPRIMITIVESTRIDEDDATA
lpD3DDrawPrimStrideData
,
DWORD
dwStartVertex
,
DWORD
dwVertexCount
,
LPWORD
dwIndices
,
DWORD
dwIndexCount
,
...
...
@@ -799,7 +798,7 @@ inline static void draw_primitive(IDirect3DDeviceImpl *This, DWORD maxvert, WORD
strided
.
normal
.
dwStride
=
sizeof
(
D3DVERTEX
);
strided
.
textureCoords
[
0
].
lpvData
=
&
((
D3DVERTEX
*
)
lpvertex
)
->
u7
.
tu
;
strided
.
textureCoords
[
0
].
dwStride
=
sizeof
(
D3DVERTEX
);
draw_primitive_strided
(
This
,
d3dpt
,
D3DFVF_VERTEX
,
&
strided
,
0
,
0
/* Unused */
,
index
,
maxvert
,
0
/* Unused */
);
draw_primitive_strided
(
This
,
d3dpt
,
D3DFVF_VERTEX
,
&
strided
,
0
/* Unused */
,
index
,
maxvert
,
0
/* Unused */
);
}
break
;
case
D3DVT_LVERTEX
:
{
...
...
@@ -811,7 +810,7 @@ inline static void draw_primitive(IDirect3DDeviceImpl *This, DWORD maxvert, WORD
strided
.
specular
.
dwStride
=
sizeof
(
D3DLVERTEX
);
strided
.
textureCoords
[
0
].
lpvData
=
&
((
D3DLVERTEX
*
)
lpvertex
)
->
u6
.
tu
;
strided
.
textureCoords
[
0
].
dwStride
=
sizeof
(
D3DLVERTEX
);
draw_primitive_strided
(
This
,
d3dpt
,
D3DFVF_LVERTEX
,
&
strided
,
0
,
0
/* Unused */
,
index
,
maxvert
,
0
/* Unused */
);
draw_primitive_strided
(
This
,
d3dpt
,
D3DFVF_LVERTEX
,
&
strided
,
0
/* Unused */
,
index
,
maxvert
,
0
/* Unused */
);
}
break
;
case
D3DVT_TLVERTEX
:
{
...
...
@@ -823,7 +822,7 @@ inline static void draw_primitive(IDirect3DDeviceImpl *This, DWORD maxvert, WORD
strided
.
specular
.
dwStride
=
sizeof
(
D3DTLVERTEX
);
strided
.
textureCoords
[
0
].
lpvData
=
&
((
D3DTLVERTEX
*
)
lpvertex
)
->
u7
.
tu
;
strided
.
textureCoords
[
0
].
dwStride
=
sizeof
(
D3DTLVERTEX
);
draw_primitive_strided
(
This
,
d3dpt
,
D3DFVF_TLVERTEX
,
&
strided
,
0
,
0
/* Unused */
,
index
,
maxvert
,
0
/* Unused */
);
draw_primitive_strided
(
This
,
d3dpt
,
D3DFVF_TLVERTEX
,
&
strided
,
0
/* Unused */
,
index
,
maxvert
,
0
/* Unused */
);
}
break
;
default
:
...
...
@@ -1023,7 +1022,6 @@ static void draw_primitive_strided(IDirect3DDeviceImpl *This,
D3DPRIMITIVETYPE
d3dptPrimitiveType
,
DWORD
d3dvtVertexType
,
LPD3DDRAWPRIMITIVESTRIDEDDATA
lpD3DDrawPrimStrideData
,
DWORD
dwStartVertex
,
DWORD
dwVertexCount
,
LPWORD
dwIndices
,
DWORD
dwIndexCount
,
...
...
@@ -1231,8 +1229,8 @@ GL_IDirect3DDeviceImpl_7_3T_DrawPrimitive(LPDIRECT3DDEVICE7 iface,
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
convert_FVF_to_strided_data
(
d3dvtVertexType
,
lpvVertices
,
&
strided
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
d3dvtVertexType
,
&
strided
,
0
,
dwVertexCount
,
NULL
,
dwVertexCount
,
dwFlags
);
convert_FVF_to_strided_data
(
d3dvtVertexType
,
lpvVertices
,
&
strided
,
0
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
d3dvtVertexType
,
&
strided
,
dwVertexCount
,
NULL
,
dwVertexCount
,
dwFlags
);
return
DD_OK
;
}
...
...
@@ -1255,8 +1253,8 @@ GL_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitive(LPDIRECT3DDEVICE7 iface,
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
convert_FVF_to_strided_data
(
d3dvtVertexType
,
lpvVertices
,
&
strided
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
d3dvtVertexType
,
&
strided
,
0
,
dwVertexCount
,
dwIndices
,
dwIndexCount
,
dwFlags
);
convert_FVF_to_strided_data
(
d3dvtVertexType
,
lpvVertices
,
&
strided
,
0
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
d3dvtVertexType
,
&
strided
,
dwVertexCount
,
dwIndices
,
dwIndexCount
,
dwFlags
);
return
DD_OK
;
}
...
...
@@ -1275,7 +1273,7 @@ GL_IDirect3DDeviceImpl_7_3T_DrawPrimitiveStrided(LPDIRECT3DDEVICE7 iface,
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
dwVertexType
,
lpD3DDrawPrimStrideData
,
0
,
dwVertexCount
,
NULL
,
dwVertexCount
,
dwFlags
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
dwVertexType
,
lpD3DDrawPrimStrideData
,
dwVertexCount
,
NULL
,
dwVertexCount
,
dwFlags
);
return
DD_OK
;
}
...
...
@@ -1297,7 +1295,7 @@ GL_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitiveStrided(LPDIRECT3DDEVICE7 iface,
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
dwVertexType
,
lpD3DDrawPrimStrideData
,
0
,
dwVertexCount
,
lpIndex
,
dwIndexCount
,
dwFlags
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
dwVertexType
,
lpD3DDrawPrimStrideData
,
dwVertexCount
,
lpIndex
,
dwIndexCount
,
dwFlags
);
return
DD_OK
;
}
...
...
@@ -1327,12 +1325,12 @@ GL_IDirect3DDeviceImpl_7_3T_DrawPrimitiveVB(LPDIRECT3DDEVICE7 iface,
This
->
set_matrices
(
This
,
VIEWMAT_CHANGED
|
WORLDMAT_CHANGED
|
PROJMAT_CHANGED
,
&
(
vb_glimp
->
world_mat
),
&
(
vb_glimp
->
view_mat
),
&
(
vb_glimp
->
proj_mat
));
convert_FVF_to_strided_data
(
vb_glimp
->
dwVertexTypeDesc
,
vb_glimp
->
vertices
,
&
strided
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
vb_glimp
->
dwVertexTypeDesc
,
&
strided
,
dw
StartVertex
,
dw
NumVertices
,
NULL
,
dwNumVertices
,
dwFlags
);
convert_FVF_to_strided_data
(
vb_glimp
->
dwVertexTypeDesc
,
vb_glimp
->
vertices
,
&
strided
,
dwStartVertex
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
vb_glimp
->
dwVertexTypeDesc
,
&
strided
,
dwNumVertices
,
NULL
,
dwNumVertices
,
dwFlags
);
}
else
{
convert_FVF_to_strided_data
(
vb_impl
->
desc
.
dwFVF
,
vb_impl
->
vertices
,
&
strided
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
vb_impl
->
desc
.
dwFVF
,
&
strided
,
dw
StartVertex
,
dw
NumVertices
,
NULL
,
dwNumVertices
,
dwFlags
);
convert_FVF_to_strided_data
(
vb_impl
->
desc
.
dwFVF
,
vb_impl
->
vertices
,
&
strided
,
dwStartVertex
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
vb_impl
->
desc
.
dwFVF
,
&
strided
,
dwNumVertices
,
NULL
,
dwNumVertices
,
dwFlags
);
}
return
DD_OK
;
...
...
@@ -1365,12 +1363,12 @@ GL_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitiveVB(LPDIRECT3DDEVICE7 iface,
This
->
set_matrices
(
This
,
VIEWMAT_CHANGED
|
WORLDMAT_CHANGED
|
PROJMAT_CHANGED
,
&
(
vb_glimp
->
world_mat
),
&
(
vb_glimp
->
view_mat
),
&
(
vb_glimp
->
proj_mat
));
convert_FVF_to_strided_data
(
vb_glimp
->
dwVertexTypeDesc
,
vb_glimp
->
vertices
,
&
strided
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
vb_glimp
->
dwVertexTypeDesc
,
&
strided
,
dw
StartVertex
,
dw
NumVertices
,
lpwIndices
,
dwIndexCount
,
dwFlags
);
convert_FVF_to_strided_data
(
vb_glimp
->
dwVertexTypeDesc
,
vb_glimp
->
vertices
,
&
strided
,
dwStartVertex
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
vb_glimp
->
dwVertexTypeDesc
,
&
strided
,
dwNumVertices
,
lpwIndices
,
dwIndexCount
,
dwFlags
);
}
else
{
convert_FVF_to_strided_data
(
vb_impl
->
desc
.
dwFVF
,
vb_impl
->
vertices
,
&
strided
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
vb_impl
->
desc
.
dwFVF
,
&
strided
,
dw
StartVertex
,
dw
NumVertices
,
lpwIndices
,
dwIndexCount
,
dwFlags
);
convert_FVF_to_strided_data
(
vb_impl
->
desc
.
dwFVF
,
vb_impl
->
vertices
,
&
strided
,
dwStartVertex
);
draw_primitive_strided
(
This
,
d3dptPrimitiveType
,
vb_impl
->
desc
.
dwFVF
,
&
strided
,
dwNumVertices
,
lpwIndices
,
dwIndexCount
,
dwFlags
);
}
return
DD_OK
;
...
...
dlls/ddraw/d3dvertexbuffer.c
View file @
19e6bf96
...
...
@@ -426,7 +426,7 @@ GL_IDirect3DVertexBufferImpl_7_1T_ProcessVertices(LPDIRECT3DVERTEXBUFFER7 iface,
if
((
dwVertexOp
&
D3DVOP_TRANSFORM
)
==
0
)
return
DDERR_INVALIDPARAMS
;
size
=
get_flexible_vertex_size
(
src_impl
->
desc
.
dwFVF
);
convert_FVF_to_strided_data
(
src_impl
->
desc
.
dwFVF
,
((
char
*
)
src_impl
->
vertices
)
+
dwSrcIndex
*
size
,
&
strided
);
convert_FVF_to_strided_data
(
src_impl
->
desc
.
dwFVF
,
((
char
*
)
src_impl
->
vertices
)
+
dwSrcIndex
*
size
,
&
strided
,
0
);
return
process_vertices_strided
(
This
,
dwVertexOp
,
dwDestIndex
,
dwCount
,
&
strided
,
src_impl
->
desc
.
dwFVF
,
device_impl
,
dwFlags
);
}
...
...
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