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
bb9837d2
Commit
bb9837d2
authored
Jan 02, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jan 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added some tracing in the fake ZBuffer methods
- added support for the DEPTH_FILL BLT - set by defaut perspective correction to nicest. - decrease the limit where 'w' is ignored
parent
f0541aa5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
15 deletions
+53
-15
d3d_private.h
dlls/ddraw/d3d_private.h
+3
-0
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+2
-1
d3dexecutebuffer.c
dlls/ddraw/d3dexecutebuffer.c
+1
-1
d3dtexture.c
dlls/ddraw/d3dtexture.c
+1
-3
mesa.c
dlls/ddraw/direct3d/mesa.c
+3
-7
fakezbuffer.c
dlls/ddraw/dsurface/fakezbuffer.c
+43
-0
mesa_private.h
dlls/ddraw/mesa_private.h
+0
-3
No files found.
dlls/ddraw/d3d_private.h
View file @
bb9837d2
...
...
@@ -59,6 +59,9 @@ struct IDirect3DImpl
/* Used as a callback for Devices to tell to the D3D object it's been created */
HRESULT
(
*
added_device
)(
IDirect3DImpl
*
d3d
,
IDirect3DDeviceImpl
*
device
);
HRESULT
(
*
removed_device
)(
IDirect3DImpl
*
d3d
,
IDirect3DDeviceImpl
*
device
);
/* This is needed for delayed texture creation and Z buffer blits */
IDirect3DDeviceImpl
*
current_device
;
};
/*****************************************************************************
...
...
dlls/ddraw/d3ddevice/mesa.c
View file @
bb9837d2
...
...
@@ -924,7 +924,7 @@ inline static void handle_xyz(D3DVALUE *coords) {
glVertex3fv
(
coords
);
}
inline
static
void
handle_xyzrhw
(
D3DVALUE
*
coords
)
{
if
(
coords
[
3
]
<
0
.
00001
)
if
(
coords
[
3
]
<
1e-8
)
glVertex3fv
(
coords
);
else
{
GLfloat
w
=
1
.
0
/
coords
[
3
];
...
...
@@ -1977,6 +1977,7 @@ d3ddevice_create(IDirect3DDeviceImpl **obj, IDirect3DImpl *d3d, IDirectDrawSurfa
object
->
set_context
(
object
);
ENTER_GL
();
TRACE
(
" current context set
\n
"
);
glHint
(
GL_PERSPECTIVE_CORRECTION_HINT
,
GL_NICEST
);
glClearColor
(
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
);
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
|
GL_STENCIL_BUFFER_BIT
);
glDrawBuffer
(
buffer
);
...
...
dlls/ddraw/d3dexecutebuffer.c
View file @
bb9837d2
...
...
@@ -125,7 +125,7 @@ static void _dump_D3DEXECUTEBUFFERDESC(LPD3DEXECUTEBUFFERDESC lpDesc) {
((col >> 8) & 0xFF) / 255.0, \
((col >> 0) & 0xFF) / 255.0); \
glTexCoord2f(vx->u7.tu, vx->u8.tv); \
if (vx->u4.rhw <
0.01
) \
if (vx->u4.rhw <
1e-8
) \
glVertex3f(vx->u1.sx, \
vx->u2.sy, \
vx->u3.sz); \
...
...
dlls/ddraw/d3dtexture.c
View file @
bb9837d2
...
...
@@ -662,14 +662,12 @@ ICOM_VTABLE(IDirect3DTexture) VTABLE_IDirect3DTexture =
HRESULT
d3dtexture_create
(
IDirect3DImpl
*
d3d
,
IDirectDrawSurfaceImpl
*
surf
,
BOOLEAN
at_creation
,
IDirectDrawSurfaceImpl
*
main
)
{
IDirect3DGLImpl
*
gl_d3d
=
(
IDirect3DGLImpl
*
)
d3d
;
/* First, initialize the texture vtables... */
ICOM_INIT_INTERFACE
(
surf
,
IDirect3DTexture
,
VTABLE_IDirect3DTexture
);
ICOM_INIT_INTERFACE
(
surf
,
IDirect3DTexture2
,
VTABLE_IDirect3DTexture2
);
/* Only create all the private stuff if we actually have an OpenGL context.. */
if
(
gl_
d3d
->
current_device
!=
NULL
)
{
if
(
d3d
->
current_device
!=
NULL
)
{
IDirect3DTextureGLImpl
*
private
;
private
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DTextureGLImpl
));
...
...
dlls/ddraw/direct3d/mesa.c
View file @
bb9837d2
...
...
@@ -379,9 +379,7 @@ ICOM_VTABLE(IDirect3D) VTABLE_IDirect3D =
static
HRESULT
d3d_add_device
(
IDirect3DImpl
*
This
,
IDirect3DDeviceImpl
*
device
)
{
IDirect3DGLImpl
*
glThis
=
(
IDirect3DGLImpl
*
)
This
;
if
(
glThis
->
current_device
==
NULL
)
{
if
(
This
->
current_device
==
NULL
)
{
/* Create delayed textures now that we have an OpenGL context...
For that, go through all surface attached to our DDraw object and create
OpenGL textures for all textures.. */
...
...
@@ -396,16 +394,14 @@ static HRESULT d3d_add_device(IDirect3DImpl *This, IDirect3DDeviceImpl *device)
}
}
/* For the moment, only one device 'supported'... */
gl
This
->
current_device
=
device
;
This
->
current_device
=
device
;
return
DD_OK
;
}
static
HRESULT
d3d_remove_device
(
IDirect3DImpl
*
This
,
IDirect3DDeviceImpl
*
device
)
{
IDirect3DGLImpl
*
glThis
=
(
IDirect3DGLImpl
*
)
This
;
glThis
->
current_device
=
NULL
;
This
->
current_device
=
NULL
;
return
DD_OK
;
}
...
...
dlls/ddraw/dsurface/fakezbuffer.c
View file @
bb9837d2
...
...
@@ -34,6 +34,7 @@
#include "ddcomimpl.h"
#include "ddraw_private.h"
#include "d3d_private.h"
#include "dsurface/main.h"
#include "dsurface/fakezbuffer.h"
...
...
@@ -114,6 +115,33 @@ FakeZBuffer_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
LPDIRECTDRAWSURFACE7
src
,
LPRECT
rsrc
,
DWORD
dwFlags
,
LPDDBLTFX
lpbltfx
)
{
ICOM_THIS
(
IDirectDrawSurfaceImpl
,
iface
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
"(%p)->(%p,%p,%p,%08lx,%p)
\n
"
,
This
,
rdst
,
src
,
rsrc
,
dwFlags
,
lpbltfx
);
if
(
rdst
)
TRACE
(
"
\t
destrect :%dx%d-%dx%d
\n
"
,
rdst
->
left
,
rdst
->
top
,
rdst
->
right
,
rdst
->
bottom
);
if
(
rsrc
)
TRACE
(
"
\t
srcrect :%dx%d-%dx%d
\n
"
,
rsrc
->
left
,
rsrc
->
top
,
rsrc
->
right
,
rsrc
->
bottom
);
TRACE
(
"
\t
flags: "
);
DDRAW_dump_DDBLT
(
dwFlags
);
if
(
dwFlags
&
DDBLT_DDFX
)
{
TRACE
(
"
\t
blitfx: "
);
DDRAW_dump_DDBLTFX
(
lpbltfx
->
dwDDFX
);
}
}
/* We only support the BLT with DEPTH_FILL for now */
if
(
This
->
ddraw_owner
->
d3d
!=
NULL
)
{
if
(
This
->
ddraw_owner
->
d3d
->
current_device
!=
NULL
)
{
This
->
ddraw_owner
->
d3d
->
current_device
->
clear
(
This
->
ddraw_owner
->
d3d
->
current_device
,
0
,
NULL
,
/* Clear the whole screen */
D3DCLEAR_ZBUFFER
,
0x00000000
,
((
double
)
lpbltfx
->
u5
.
dwFillDepth
)
/
4294967295
.
0
,
0x00000000
);
return
DD_OK
;
}
}
return
cant_do_that
(
"blt to a"
);
}
...
...
@@ -122,6 +150,21 @@ FakeZBuffer_DirectDrawSurface_BltFast(LPDIRECTDRAWSURFACE7 iface, DWORD dstx,
DWORD
dsty
,
LPDIRECTDRAWSURFACE7
src
,
LPRECT
rsrc
,
DWORD
trans
)
{
ICOM_THIS
(
IDirectDrawSurfaceImpl
,
iface
);
if
(
TRACE_ON
(
ddraw
))
{
FIXME
(
"(%p)->(%ld,%ld,%p,%p,%08lx)
\n
"
,
This
,
dstx
,
dsty
,
src
,
rsrc
,
trans
);
FIXME
(
"
\t
trans:"
);
if
(
FIXME_ON
(
ddraw
))
DDRAW_dump_DDBLTFAST
(
trans
);
if
(
rsrc
)
FIXME
(
"
\t
srcrect: %dx%d-%dx%d
\n
"
,
rsrc
->
left
,
rsrc
->
top
,
rsrc
->
right
,
rsrc
->
bottom
);
else
FIXME
(
" srcrect: NULL
\n
"
);
}
return
cant_do_that
(
"bltfast to a"
);
}
...
...
dlls/ddraw/mesa_private.h
View file @
bb9837d2
...
...
@@ -82,9 +82,6 @@ typedef struct IDirect3DGLImpl
struct
IDirect3DImpl
parent
;
int
free_lights
;
void
(
*
light_released
)(
IDirect3DImpl
*
,
GLenum
light_num
);
/* This is needed for delayed texture creation */
struct
IDirect3DDeviceImpl
*
current_device
;
}
IDirect3DGLImpl
;
typedef
struct
IDirect3DLightGLImpl
...
...
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