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
a122673e
Commit
a122673e
authored
Nov 17, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Nov 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix graphical corruption on surface lock when multi-texturing is
active.
parent
7b6b9d6e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+12
-12
mesa.c
dlls/ddraw/mesa.c
+2
-2
No files found.
dlls/ddraw/d3ddevice/mesa.c
View file @
a122673e
...
...
@@ -105,10 +105,22 @@ static DWORD d3ddevice_set_state_for_flush(IDirect3DDeviceImpl *d3d_dev, LPCRECT
IDirect3DDeviceGLImpl
*
gl_d3d_dev
=
(
IDirect3DDeviceGLImpl
*
)
d3d_dev
;
DWORD
opt_bitmap
=
0x00000000
;
if
(
gl_d3d_dev
->
current_bound_texture
[
1
]
!=
NULL
)
{
if
(
gl_d3d_dev
->
current_active_tex_unit
!=
GL_TEXTURE1_WINE
)
{
GL_extensions
.
glActiveTexture
(
GL_TEXTURE1_WINE
);
gl_d3d_dev
->
current_active_tex_unit
=
GL_TEXTURE1_WINE
;
}
/* 'unbound' texture level 1 in that case to disable multi-texturing */
glBindTexture
(
GL_TEXTURE_2D
,
0
);
glDisable
(
GL_TEXTURE_2D
);
}
if
(
gl_d3d_dev
->
current_active_tex_unit
!=
GL_TEXTURE0_WINE
)
{
GL_extensions
.
glActiveTexture
(
GL_TEXTURE0_WINE
);
gl_d3d_dev
->
current_active_tex_unit
=
GL_TEXTURE0_WINE
;
}
if
((
gl_d3d_dev
->
current_bound_texture
[
0
]
==
NULL
)
||
(
d3d_dev
->
state_block
.
texture_stage_state
[
0
][
D3DTSS_COLOROP
-
1
]
==
D3DTOP_DISABLE
))
glEnable
(
GL_TEXTURE_2D
);
if
(
gl_d3d_dev
->
unlock_tex
==
0
)
{
glGenTextures
(
1
,
&
gl_d3d_dev
->
unlock_tex
);
glBindTexture
(
GL_TEXTURE_2D
,
gl_d3d_dev
->
unlock_tex
);
...
...
@@ -132,18 +144,6 @@ static DWORD d3ddevice_set_state_for_flush(IDirect3DDeviceImpl *d3d_dev, LPCRECT
}
if
(
gl_d3d_dev
->
depth_test
!=
FALSE
)
glDisable
(
GL_DEPTH_TEST
);
if
((
gl_d3d_dev
->
current_bound_texture
[
0
]
==
NULL
)
||
(
d3d_dev
->
state_block
.
texture_stage_state
[
0
][
D3DTSS_COLOROP
-
1
]
==
D3DTOP_DISABLE
))
glEnable
(
GL_TEXTURE_2D
);
if
(
gl_d3d_dev
->
current_bound_texture
[
1
]
!=
NULL
)
{
if
(
gl_d3d_dev
->
current_active_tex_unit
!=
GL_TEXTURE1_WINE
)
{
GL_extensions
.
glActiveTexture
(
GL_TEXTURE1_WINE
);
gl_d3d_dev
->
current_active_tex_unit
=
GL_TEXTURE1_WINE
;
}
/* 'unbound' texture level 1 in that case to disable multi-texturing */
glBindTexture
(
GL_TEXTURE_2D
,
0
);
glDisable
(
GL_TEXTURE_2D
);
}
glEnable
(
GL_SCISSOR_TEST
);
if
((
d3d_dev
->
active_viewport
.
dvMinZ
!=
0
.
0
)
||
(
d3d_dev
->
active_viewport
.
dvMaxZ
!=
1
.
0
))
{
...
...
dlls/ddraw/mesa.c
View file @
a122673e
...
...
@@ -907,6 +907,8 @@ HRESULT upload_surface_to_tex_memory_init(IDirectDrawSurfaceImpl *surf_ptr, GLui
}
glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
current_storage_width
);
TRACE
(
" initialized texture upload for level %d with conversion %d.
\n
"
,
current_level
,
convert_type
);
return
DD_OK
;
}
...
...
@@ -933,8 +935,6 @@ HRESULT upload_surface_to_tex_memory(RECT *rect, DWORD xoffset, DWORD yoffset, v
/* Used when converting stuff */
line_increase
=
src_d
->
u1
.
lPitch
-
(
width
*
bpp
);
TRACE
(
" uploading texture to memory using conversion %d.
\n
"
,
convert_type
);
switch
(
convert_type
)
{
case
CONVERT_PALETTED
:
{
IDirectDrawPaletteImpl
*
pal
=
current_surface
->
palette
;
...
...
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