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
091f9c28
Commit
091f9c28
authored
Jan 02, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Put the decoded strided data structure into the device.
parent
f5fafab6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
23 deletions
+15
-23
drawprim.c
dlls/wined3d/drawprim.c
+12
-23
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-0
No files found.
dlls/wined3d/drawprim.c
View file @
091f9c28
...
...
@@ -1947,7 +1947,6 @@ void drawPrimitive(IWineD3DDevice *iface,
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
BOOL
useVertexShaderFunction
=
FALSE
;
BOOL
usePixelShaderFunction
=
FALSE
;
WineDirect3DVertexStridedData
*
dataLocations
;
IWineD3DSwapChainImpl
*
swapchain
;
int
i
;
BOOL
fixup
=
FALSE
;
...
...
@@ -2002,8 +2001,8 @@ void drawPrimitive(IWineD3DDevice *iface,
/* Note: this is a ddraw fixed-function code path */
TRACE
(
"================ Strided Input ===================
\n
"
);
dataLocations
=
DrawPrimStrideData
;
drawPrimitiveTraceDataLocations
(
dataLocation
s
);
memcpy
(
&
This
->
strided_streams
,
DrawPrimStrideData
,
sizeof
(
This
->
strided_streams
))
;
drawPrimitiveTraceDataLocations
(
&
This
->
strided_stream
s
);
fixup
=
FALSE
;
}
...
...
@@ -2015,17 +2014,13 @@ void drawPrimitive(IWineD3DDevice *iface,
* don't set any declaration at all */
TRACE
(
"================ Vertex Declaration ===================
\n
"
);
dataLocations
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
dataLocations
));
if
(
!
dataLocations
)
{
ERR
(
"Out of memory!
\n
"
);
return
;
}
memset
(
&
This
->
strided_streams
,
0
,
sizeof
(
This
->
strided_streams
));
if
(
This
->
stateBlock
->
vertexDecl
!=
NULL
||
((
IWineD3DVertexShaderImpl
*
)
This
->
stateBlock
->
vertexShader
)
->
vertexDeclaration
!=
NULL
)
((
IWineD3DVertexShaderImpl
*
)
This
->
stateBlock
->
vertexShader
)
->
vertexDeclaration
!=
NULL
)
primitiveDeclarationConvertToStridedData
(
iface
,
useVertexShaderFunction
,
dataLocation
s
,
StartVertexIndex
,
&
fixup
);
primitiveDeclarationConvertToStridedData
(
iface
,
useVertexShaderFunction
,
&
This
->
strided_stream
s
,
StartVertexIndex
,
&
fixup
);
}
else
{
...
...
@@ -2034,20 +2029,16 @@ void drawPrimitive(IWineD3DDevice *iface,
* It will not work properly for shaders. */
TRACE
(
"================ FVF ===================
\n
"
);
dataLocations
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
dataLocations
));
if
(
!
dataLocations
)
{
ERR
(
"Out of memory!
\n
"
);
return
;
}
primitiveConvertToStridedData
(
iface
,
dataLocations
,
StartVertexIndex
,
&
fixup
);
drawPrimitiveTraceDataLocations
(
dataLocations
);
memset
(
&
This
->
strided_streams
,
0
,
sizeof
(
This
->
strided_streams
));
primitiveConvertToStridedData
(
iface
,
&
This
->
strided_streams
,
StartVertexIndex
,
&
fixup
);
drawPrimitiveTraceDataLocations
(
&
This
->
strided_streams
);
}
/* Setup transform matrices and sort out */
primitiveInitState
(
iface
,
dataLocation
s
,
useVertexShaderFunction
,
&
lighting_changed
,
&
lighting_original
);
primitiveInitState
(
iface
,
&
This
->
strided_stream
s
,
useVertexShaderFunction
,
&
lighting_changed
,
&
lighting_original
);
/* Now initialize the materials state */
init_materials
(
iface
,
(
dataLocations
->
u
.
s
.
diffuse
.
lpData
!=
NULL
||
dataLocations
->
u
.
s
.
diffuse
.
VBO
!=
0
));
init_materials
(
iface
,
(
This
->
strided_streams
.
u
.
s
.
diffuse
.
lpData
!=
NULL
||
This
->
strided_streams
.
u
.
s
.
diffuse
.
VBO
!=
0
));
{
GLenum
glPrimType
;
...
...
@@ -2058,12 +2049,10 @@ void drawPrimitive(IWineD3DDevice *iface,
numberOfVertices
=
calculatedNumberOfindices
;
drawPrimitiveDrawStrided
(
iface
,
useVertexShaderFunction
,
usePixelShaderFunction
,
dataLocation
s
,
numberOfVertices
,
calculatedNumberOfindices
,
glPrimType
,
&
This
->
strided_stream
s
,
numberOfVertices
,
calculatedNumberOfindices
,
glPrimType
,
idxData
,
idxSize
,
minIndex
,
StartIdx
,
fixup
);
}
if
(
!
DrawPrimStrideData
)
HeapFree
(
GetProcessHeap
(),
0
,
dataLocations
);
/* If vertex shaders or no normals, restore previous lighting state */
if
(
lighting_changed
)
{
if
(
lighting_original
)
glEnable
(
GL_LIGHTING
);
...
...
dlls/wined3d/wined3d_private.h
View file @
091f9c28
...
...
@@ -659,6 +659,9 @@ typedef struct IWineD3DDeviceImpl
DWORD
texUnitMap
[
MAX_SAMPLERS
];
BOOL
oneToOneTexUnitMap
;
/* Stream source management */
WineDirect3DVertexStridedData
strided_streams
;
}
IWineD3DDeviceImpl
;
extern
const
IWineD3DDeviceVtbl
IWineD3DDevice_Vtbl
;
...
...
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