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
5b77a2f9
Commit
5b77a2f9
authored
Aug 13, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Override the default filter of conditional np2 textures.
parent
cadb8854
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
texture.c
dlls/wined3d/texture.c
+10
-2
No files found.
dlls/wined3d/texture.c
View file @
5b77a2f9
...
@@ -229,17 +229,25 @@ static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface) {
...
@@ -229,17 +229,25 @@ static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface) {
}
}
/* Conditinal non power of two textures use a different clamping default. If we're using the GL_WINE_normalized_texrect
/* Conditinal non power of two textures use a different clamping default. If we're using the GL_WINE_normalized_texrect
* partial driver emulation, we're dealing with a GL_TEXTURE_2D texture which has the address mode set to repeat - something
* partial driver emulation, we're dealing with a GL_TEXTURE_2D texture which has the address mode set to repeat - something
* that prevents us from hitting the accelerated codepath. Thus manually set the GL state
* that prevents us from hitting the accelerated codepath. Thus manually set the GL state. The same applies to filtering.
* Even if the texture has only one mip level, the default LINEAR_MIPMAP_LINEAR filter causes a SW fallback on macos.
*/
*/
if
(
IWineD3DBaseTexture_IsCondNP2
(
iface
))
{
if
(
IWineD3DBaseTexture_IsCondNP2
(
iface
))
{
ENTER_GL
();
ENTER_GL
();
glTexParameteri
(
IWineD3DTexture_GetTextureDimensions
(
iface
),
GL_TEXTURE_WRAP_S
,
GL_CLAMP_TO_EDGE
);
glTexParameteri
(
IWineD3DTexture_GetTextureDimensions
(
iface
),
GL_TEXTURE_WRAP_S
,
GL_CLAMP_TO_EDGE
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)"
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)"
);
glTexParameteri
(
IWineD3DTexture_GetTextureDimensions
(
iface
),
GL_TEXTURE_WRAP_T
,
GL_CLAMP_TO_EDGE
);
glTexParameteri
(
IWineD3DTexture_GetTextureDimensions
(
iface
),
GL_TEXTURE_WRAP_T
,
GL_CLAMP_TO_EDGE
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)"
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)"
);
glTexParameteri
(
IWineD3DTexture_GetTextureDimensions
(
iface
),
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_MIN_FILTER, GL_NEAREST)"
);
glTexParameteri
(
IWineD3DTexture_GetTextureDimensions
(
iface
),
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_MAG_FILTER, GL_NEAREST)"
);
LEAVE_GL
();
LEAVE_GL
();
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSU
]
=
WINED3DTADDRESS_CLAMP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSU
]
=
WINED3DTADDRESS_CLAMP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSV
]
=
WINED3DTADDRESS_CLAMP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSV
]
=
WINED3DTADDRESS_CLAMP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3DTEXF_POINT
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3DTEXF_POINT
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_MIPFILTER
]
=
WINED3DTEXF_NONE
;
}
}
}
}
...
...
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