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
5f87d778
Commit
5f87d778
authored
Jan 03, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jan 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- some additionnal flags logged
- fixes in the vertex buffer thunking + optimized flag support
parent
f947a580
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
77 additions
and
12 deletions
+77
-12
d3d_private.h
dlls/ddraw/d3d_private.h
+1
-0
d3dcommon.c
dlls/ddraw/d3dcommon.c
+15
-0
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+32
-4
d3dvertexbuffer.c
dlls/ddraw/d3dvertexbuffer.c
+13
-2
main.c
dlls/ddraw/direct3d/main.c
+4
-0
mesa.c
dlls/ddraw/direct3d/mesa.c
+0
-2
mesa.c
dlls/ddraw/mesa.c
+5
-2
mesa_private.h
dlls/ddraw/mesa_private.h
+1
-1
d3d.h
include/d3d.h
+6
-1
No files found.
dlls/ddraw/d3d_private.h
View file @
5f87d778
...
...
@@ -226,6 +226,7 @@ extern const char *_get_renderstate(D3DRENDERSTATETYPE type);
extern
void
dump_D3DMATERIAL7
(
LPD3DMATERIAL7
lpMat
);
extern
void
dump_D3DCOLORVALUE
(
D3DCOLORVALUE
*
lpCol
);
extern
void
dump_D3DLIGHT7
(
LPD3DLIGHT7
lpLight
);
extern
void
dump_DPFLAGS
(
DWORD
dwFlags
);
#define dump_mat(mat) \
TRACE("%f %f %f %f\n", (mat)->_11, (mat)->_12, (mat)->_13, (mat)->_14); \
...
...
dlls/ddraw/d3dcommon.c
View file @
5f87d778
...
...
@@ -204,3 +204,18 @@ dump_D3DLIGHT7(LPD3DLIGHT7 lpLight)
DPRINTF
(
" - dvTheta : %f
\n
"
,
lpLight
->
dvTheta
);
DPRINTF
(
" - dvPhi : %f
\n
"
,
lpLight
->
dvPhi
);
}
void
dump_DPFLAGS
(
DWORD
dwFlags
)
{
static
const
flag_info
flags
[]
=
{
FE
(
D3DDP_WAIT
),
FE
(
D3DDP_OUTOFORDER
),
FE
(
D3DDP_DONOTCLIP
),
FE
(
D3DDP_DONOTUPDATEEXTENTS
),
FE
(
D3DDP_DONOTLIGHT
)
};
DDRAW_dump_flags
(
dwFlags
,
flags
,
sizeof
(
flags
)
/
sizeof
(
flags
[
0
]));
}
dlls/ddraw/d3ddevice/mesa.c
View file @
5f87d778
...
...
@@ -831,11 +831,13 @@ GL_IDirect3DDeviceImpl_2_DrawPrimitive(LPDIRECT3DDEVICE2 iface,
DWORD
dwFlags
)
{
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice2
,
iface
);
TRACE
(
"(%p/%p)->(%08x,%08x,%p,%08lx,%08lx)
\n
"
,
This
,
iface
,
d3dptPrimitiveType
,
d3dvtVertexType
,
lpvVertices
,
dwVertexCount
,
dwFlags
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
ENTER_GL
();
draw_primitive
(
This
,
dwVertexCount
,
NULL
,
d3dvtVertexType
,
d3dptPrimitiveType
,
lpvVertices
);
LEAVE_GL
();
return
DD_OK
;
}
...
...
@@ -852,10 +854,11 @@ GL_IDirect3DDeviceImpl_2_DrawIndexedPrimitive(LPDIRECT3DDEVICE2 iface,
{
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice2
,
iface
);
TRACE
(
"(%p/%p)->(%08x,%08x,%p,%08lx,%p,%08lx,%08lx)
\n
"
,
This
,
iface
,
d3dptPrimitiveType
,
d3dvtVertexType
,
lpvVertices
,
dwVertexCount
,
dwIndices
,
dwIndexCount
,
dwFlags
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
ENTER_GL
();
draw_primitive
(
This
,
dwIndexCount
,
dwIndices
,
d3dvtVertexType
,
d3dptPrimitiveType
,
lpvVertices
);
LEAVE_GL
();
return
DD_OK
;
}
...
...
@@ -1291,7 +1294,11 @@ GL_IDirect3DDeviceImpl_7_3T_DrawPrimitive(LPDIRECT3DDEVICE7 iface,
DWORD
dwFlags
)
{
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice7
,
iface
);
TRACE
(
"(%p/%p)->(%08x,%08lx,%p,%08lx,%08lx)
\n
"
,
This
,
iface
,
d3dptPrimitiveType
,
d3dvtVertexType
,
lpvVertices
,
dwVertexCount
,
dwFlags
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
draw_primitive_7
(
This
,
d3dptPrimitiveType
,
d3dvtVertexType
,
lpvVertices
,
0
,
dwVertexCount
,
NULL
,
dwVertexCount
,
dwFlags
);
...
...
@@ -1309,7 +1316,11 @@ GL_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitive(LPDIRECT3DDEVICE7 iface,
DWORD
dwFlags
)
{
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice7
,
iface
);
TRACE
(
"(%p/%p)->(%08x,%08lx,%p,%08lx,%p,%08lx,%08lx)
\n
"
,
This
,
iface
,
d3dptPrimitiveType
,
d3dvtVertexType
,
lpvVertices
,
dwVertexCount
,
dwIndices
,
dwIndexCount
,
dwFlags
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
draw_primitive_7
(
This
,
d3dptPrimitiveType
,
d3dvtVertexType
,
lpvVertices
,
0
,
dwVertexCount
,
dwIndices
,
dwIndexCount
,
dwFlags
);
...
...
@@ -1325,8 +1336,13 @@ GL_IDirect3DDeviceImpl_7_3T_DrawPrimitiveStrided(LPDIRECT3DDEVICE7 iface,
DWORD
dwFlags
)
{
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice7
,
iface
);
TRACE
(
"(%p/%p)->(%08x,%08lx,%p,%08lx,%08lx)
\n
"
,
This
,
iface
,
d3dptPrimitiveType
,
dwVertexType
,
lpD3DDrawPrimStrideData
,
dwVertexCount
,
dwFlags
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
draw_primitive_strided_7
(
This
,
d3dptPrimitiveType
,
dwVertexType
,
lpD3DDrawPrimStrideData
,
0
,
dwVertexCount
,
NULL
,
dwVertexCount
,
dwFlags
);
return
DD_OK
;
}
...
...
@@ -1341,8 +1357,14 @@ GL_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitiveStrided(LPDIRECT3DDEVICE7 iface,
DWORD
dwFlags
)
{
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice7
,
iface
);
TRACE
(
"(%p/%p)->(%08x,%08lx,%p,%08lx,%p,%08lx,%08lx)
\n
"
,
This
,
iface
,
d3dptPrimitiveType
,
dwVertexType
,
lpD3DDrawPrimStrideData
,
dwVertexCount
,
lpIndex
,
dwIndexCount
,
dwFlags
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
draw_primitive_strided_7
(
This
,
d3dptPrimitiveType
,
dwVertexType
,
lpD3DDrawPrimStrideData
,
0
,
dwVertexCount
,
lpIndex
,
dwIndexCount
,
dwFlags
);
return
DD_OK
;
}
...
...
@@ -1358,6 +1380,9 @@ GL_IDirect3DDeviceImpl_7_3T_DrawPrimitiveVB(LPDIRECT3DDEVICE7 iface,
IDirect3DVertexBufferImpl
*
vb_impl
=
ICOM_OBJECT
(
IDirect3DVertexBufferImpl
,
IDirect3DVertexBuffer7
,
lpD3DVertexBuf
);
TRACE
(
"(%p/%p)->(%08x,%p,%08lx,%08lx,%08lx)
\n
"
,
This
,
iface
,
d3dptPrimitiveType
,
lpD3DVertexBuf
,
dwStartVertex
,
dwNumVertices
,
dwFlags
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
draw_primitive_7
(
This
,
d3dptPrimitiveType
,
vb_impl
->
desc
.
dwFVF
,
vb_impl
->
vertices
,
dwStartVertex
,
dwNumVertices
,
NULL
,
dwNumVertices
,
dwFlags
);
...
...
@@ -1378,6 +1403,9 @@ GL_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitiveVB(LPDIRECT3DDEVICE7 iface,
IDirect3DVertexBufferImpl
*
vb_impl
=
ICOM_OBJECT
(
IDirect3DVertexBufferImpl
,
IDirect3DVertexBuffer7
,
lpD3DVertexBuf
);
TRACE
(
"(%p/%p)->(%08x,%p,%08lx,%08lx,%p,%08lx,%08lx)
\n
"
,
This
,
iface
,
d3dptPrimitiveType
,
lpD3DVertexBuf
,
dwStartVertex
,
dwNumVertices
,
lpwIndices
,
dwIndexCount
,
dwFlags
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
" - flags : "
);
dump_DPFLAGS
(
dwFlags
);
}
draw_primitive_7
(
This
,
d3dptPrimitiveType
,
vb_impl
->
desc
.
dwFVF
,
vb_impl
->
vertices
,
dwStartVertex
,
dwNumVertices
,
lpwIndices
,
dwIndexCount
,
dwFlags
);
...
...
dlls/ddraw/d3dvertexbuffer.c
View file @
5f87d778
...
...
@@ -99,6 +99,8 @@ Main_IDirect3DVertexBufferImpl_7_1T_Lock(LPDIRECT3DVERTEXBUFFER7 iface,
DDRAW_dump_lockflag
(
dwFlags
);
}
if
(
This
->
desc
.
dwCaps
&
D3DVBCAPS_OPTIMIZED
)
return
D3DERR_VERTEXBUFFEROPTIMIZED
;
if
(
lpdwSize
!=
NULL
)
*
lpdwSize
=
This
->
vertex_buffer_size
;
*
lplpData
=
This
->
vertices
;
...
...
@@ -135,9 +137,14 @@ Main_IDirect3DVertexBufferImpl_7_1T_GetVertexBufferDesc(LPDIRECT3DVERTEXBUFFER7
{
DWORD
size
;
ICOM_THIS_FROM
(
IDirect3DVertexBufferImpl
,
IDirect3DVertexBuffer7
,
iface
);
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
lpD3DVertexBufferDesc
);
size
=
(
lpD3DVertexBufferDesc
->
dwSize
<
This
->
desc
.
dwSize
)
?
lpD3DVertexBufferDesc
->
dwSize
:
This
->
desc
.
dwSize
;
memcpy
(
lpD3DVertexBufferDesc
,
&
This
->
desc
,
size
);
size
=
lpD3DVertexBufferDesc
->
dwSize
;
memset
(
lpD3DVertexBufferDesc
,
0
,
size
);
memcpy
(
lpD3DVertexBufferDesc
,
&
This
->
desc
,
(
size
<
This
->
desc
.
dwSize
)
?
size
:
This
->
desc
.
dwSize
);
return
DD_OK
;
}
...
...
@@ -148,6 +155,9 @@ Main_IDirect3DVertexBufferImpl_7_Optimize(LPDIRECT3DVERTEXBUFFER7 iface,
{
ICOM_THIS_FROM
(
IDirect3DVertexBufferImpl
,
IDirect3DVertexBuffer7
,
iface
);
FIXME
(
"(%p/%p)->(%p,%08lx): stub!
\n
"
,
This
,
iface
,
lpD3DDevice
,
dwFlags
);
This
->
desc
.
dwCaps
|=
D3DVBCAPS_OPTIMIZED
;
return
DD_OK
;
}
...
...
@@ -297,6 +307,7 @@ HRESULT d3dvertexbuffer_create(IDirect3DVertexBufferImpl **obj, IDirect3DImpl *d
{
IDirect3DVertexBufferImpl
*
object
;
static
const
flag_info
flags
[]
=
{
FE
(
D3DVBCAPS_DONOTCLIP
),
FE
(
D3DVBCAPS_OPTIMIZED
),
FE
(
D3DVBCAPS_SYSTEMMEMORY
),
FE
(
D3DVBCAPS_WRITEONLY
)
...
...
dlls/ddraw/direct3d/main.c
View file @
5f87d778
...
...
@@ -466,6 +466,10 @@ Thunk_IDirect3DImpl_3_CreateVertexBuffer(LPDIRECT3D3 iface,
LPDIRECT3DVERTEXBUFFER7
ret_val
;
TRACE
(
"(%p)->(%p,%p,%08lx,%p) thunking to IDirect3D7 interface.
\n
"
,
iface
,
lpD3DVertBufDesc
,
lplpD3DVertBuf
,
dwFlags
,
lpUnk
);
/* dwFlags is not used in the D3D7 interface, use the vertex buffer description instead */
if
(
dwFlags
&
D3DDP_DONOTCLIP
)
lpD3DVertBufDesc
->
dwCaps
|=
D3DVBCAPS_DONOTCLIP
;
ret
=
IDirect3D7_CreateVertexBuffer
(
COM_INTERFACE_CAST
(
IDirect3DImpl
,
IDirect3D3
,
IDirect3D7
,
iface
),
lpD3DVertBufDesc
,
&
ret_val
,
...
...
dlls/ddraw/direct3d/mesa.c
View file @
5f87d778
...
...
@@ -40,8 +40,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ddraw
);
#define MAX_LIGHTS 8
HRESULT
WINAPI
GL_IDirect3DImpl_3_2T_1T_EnumDevices
(
LPDIRECT3D3
iface
,
LPD3DENUMDEVICESCALLBACK
lpEnumDevicesCallback
,
...
...
dlls/ddraw/mesa.c
View file @
5f87d778
...
...
@@ -464,9 +464,12 @@ void set_render_state(D3DRENDERSTATETYPE dwRenderStateType,
glStencilMask
(
dwRenderState
);
break
;
case
D3DRENDERSTATE_CLIPPING
:
/* 136 */
/* Nothing to do here... Even if what we receive is already clipped by the application,
we cannot tell OpenGL to not re-clip it. */
break
;
case
D3DRENDERSTATE_LIGHTING
:
/* 137 */
/* There will be more to do here once we really support D3D7 Lighting.
Should be enough for now to prevent warnings :-) */
if
(
dwRenderState
)
glEnable
(
GL_LIGHTING
);
else
...
...
dlls/ddraw/mesa_private.h
View file @
5f87d778
...
...
@@ -91,7 +91,7 @@ void set_render_state(D3DRENDERSTATETYPE dwRenderStateType,
typedef
struct
IDirect3DGLImpl
{
struct
IDirect3DImpl
parent
;
int
free_lights
;
DWORD
free_lights
;
void
(
*
light_released
)(
IDirect3DImpl
*
,
GLenum
light_num
);
}
IDirect3DGLImpl
;
...
...
include/d3d.h
View file @
5f87d778
...
...
@@ -183,6 +183,12 @@ typedef struct IDirect3DVertexBuffer7 IDirect3DVertexBuffer7, *LPDIRECT3DVERTEXB
#define D3DNEXT_HEAD 0x02l
#define D3DNEXT_TAIL 0x04l
#define D3DDP_WAIT 0x00000001l
#define D3DDP_OUTOFORDER 0x00000002l
#define D3DDP_DONOTCLIP 0x00000004l
#define D3DDP_DONOTUPDATEEXTENTS 0x00000008l
#define D3DDP_DONOTLIGHT 0x00000010l
/* ********************************************************************
Types and structures
******************************************************************** */
...
...
@@ -1015,5 +1021,4 @@ ICOM_DEFINE(IDirect3DVertexBuffer7,IUnknown)
#define IDirect3DVertexBuffer7_Optimize(p,a,b) ICOM_CALL2(Optimize,p,a,b)
#define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) ICOM_CALL7(ProcessVerticesStrided,p,a,b,c,d,e,f,g)
#endif
/* __WINE_D3D_H */
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