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
85155cc6
Commit
85155cc6
authored
Oct 12, 2005
by
Christian Costa
Committed by
Alexandre Julliard
Oct 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable depth test when there is no Z buffer attached.
Initialise texture states at creation instead of when tex name is generated.
parent
44b47779
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
device_opengl.c
dlls/ddraw/device_opengl.c
+8
-1
texture.c
dlls/ddraw/texture.c
+2
-4
No files found.
dlls/ddraw/device_opengl.c
View file @
85155cc6
...
...
@@ -1325,6 +1325,7 @@ static void draw_primitive_strided(IDirect3DDeviceImpl *This,
IDirect3DDeviceGLImpl
*
glThis
=
(
IDirect3DDeviceGLImpl
*
)
This
;
int
num_active_stages
=
0
;
int
num_tex_index
=
GET_TEXCOUNT_FROM_FVF
(
d3dvtVertexType
);
BOOL
reenable_depth_test
=
FALSE
;
/* I put the trace before the various locks... So as to better understand where locks occur :-) */
if
(
TRACE_ON
(
ddraw
))
{
...
...
@@ -1349,9 +1350,12 @@ static void draw_primitive_strided(IDirect3DDeviceImpl *This,
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
ICOM_INTERFACE
(
This
->
surface
,
IDirectDrawSurface7
),
(
DDSCAPS2
*
)
&
zbuf_caps
,
&
zbuf
);
if
(
!
FAIL
ED
(
hr
))
{
if
(
SUCCEED
ED
(
hr
))
{
This
->
current_zbuffer
=
ICOM_OBJECT
(
IDirectDrawSurfaceImpl
,
IDirectDrawSurface7
,
zbuf
);
IDirectDrawSurface7_Release
(
zbuf
);
}
else
if
(
glThis
->
depth_test
)
{
glDisable
(
GL_DEPTH_TEST
);
reenable_depth_test
=
TRUE
;
}
}
if
(
This
->
current_zbuffer
!=
NULL
)
{
...
...
@@ -1615,6 +1619,9 @@ static void draw_primitive_strided(IDirect3DDeviceImpl *This,
/* Whatever the case, disable the color material stuff */
glDisable
(
GL_COLOR_MATERIAL
);
if
(
reenable_depth_test
)
glEnable
(
GL_DEPTH_TEST
);
LEAVE_GL
();
TRACE
(
"End
\n
"
);
...
...
dlls/ddraw/texture.c
View file @
85155cc6
...
...
@@ -903,12 +903,14 @@ HRESULT d3dtexture_create(IDirectDrawImpl *d3d, IDirectDrawSurfaceImpl *surf, BO
private
->
tex_name
=
0
;
if
(
surf
->
mipmap_level
==
0
)
{
private
->
main
=
NULL
;
private
->
__global_dirty_flag
=
SURFACE_MEMORY_DIRTY
;
private
->
global_dirty_flag
=
&
(
private
->
__global_dirty_flag
);
}
else
{
private
->
main
=
main
;
private
->
global_dirty_flag
=
&
(((
IDirect3DTextureGLImpl
*
)
(
private
->
main
->
tex_private
))
->
__global_dirty_flag
);
}
private
->
initial_upload_done
=
FALSE
;
private
->
dirty_flag
=
SURFACE_MEMORY_DIRTY
;
}
return
D3D_OK
;
...
...
@@ -925,15 +927,11 @@ GLuint gltex_get_tex_name(IDirectDrawSurfaceImpl *surf)
glGenTextures
(
1
,
&
(
private
->
tex_name
));
if
(
private
->
tex_name
==
0
)
ERR
(
"Error at creation of OpenGL texture ID !
\n
"
);
TRACE
(
" GL texture id is : %d.
\n
"
,
private
->
tex_name
);
private
->
__global_dirty_flag
=
SURFACE_MEMORY_DIRTY
;
}
else
{
private
->
tex_name
=
gltex_get_tex_name
(
private
->
main
);
TRACE
(
" GL texture id reusing id %d from surface %p (private at %p)).
\n
"
,
private
->
tex_name
,
private
->
main
,
private
->
main
->
tex_private
);
}
LEAVE_GL
();
/* And set the dirty flag accordingly */
private
->
dirty_flag
=
SURFACE_MEMORY_DIRTY
;
}
return
((
IDirect3DTextureGLImpl
*
)
(
surf
->
tex_private
))
->
tex_name
;
}
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