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
9a9fcd1a
Commit
9a9fcd1a
authored
Jul 02, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
Jul 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure MIPMAP levels is reset when rebinding an existing texture to a
texture unit.
parent
39538a5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
texture.c
dlls/d3d8/texture.c
+12
-9
No files found.
dlls/d3d8/texture.c
View file @
9a9fcd1a
...
...
@@ -119,7 +119,8 @@ void WINAPI IDirect3DTexture8Impl_PreLoad(LPDIRECT3DTEXTURE8 iface) {
checkGLcall
(
"glBindTexture"
);
TRACE
(
"Texture %p (level %d) given name %d
\n
"
,
This
->
surfaces
[
i
],
i
,
This
->
surfaces
[
i
]
->
textureName
);
/* No need to walk through all mip-map levels, since already all assigned */
i
=
This
->
levels
;
i
=
This
->
levels
;
}
else
{
if
(
i
==
0
)
{
if
(
This
->
surfaces
[
i
]
->
textureName
==
0
)
{
...
...
@@ -130,19 +131,21 @@ void WINAPI IDirect3DTexture8Impl_PreLoad(LPDIRECT3DTEXTURE8 iface) {
glBindTexture
(
GL_TEXTURE_2D
,
This
->
surfaces
[
i
]
->
textureName
);
checkGLcall
(
"glBindTexture"
);
TRACE
(
"Setting GL_TEXTURE_MAX_LEVEL to %d
\n
"
,
This
->
levels
-
1
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAX_LEVEL
,
This
->
levels
-
1
);
checkGLcall
(
"glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, This->levels)"
);
}
IDirect3DSurface8Impl_LoadTexture
((
LPDIRECT3DSURFACE8
)
This
->
surfaces
[
i
],
GL_TEXTURE_2D
,
i
);
/* Removed glTexParameterf now TextureStageStates are initialized at startup */
This
->
Dirty
=
FALSE
;
}
}
/* No longer dirty */
This
->
Dirty
=
FALSE
;
/* Always need to reset the number of mipmap levels when rebinding as it is
a property of the active texture unit, and another texture may have set it
to a different value */
TRACE
(
"Setting GL_TEXTURE_MAX_LEVEL to %d
\n
"
,
This
->
levels
-
1
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAX_LEVEL
,
This
->
levels
-
1
);
checkGLcall
(
"glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, This->levels)"
);
LEAVE_GL
();
return
;
...
...
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