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
2b86950c
Commit
2b86950c
authored
Mar 16, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simplify context_apply_attachment_filter_states() flow a bit.
parent
ec10c1ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
26 deletions
+31
-26
context.c
dlls/wined3d/context.c
+31
-26
No files found.
dlls/wined3d/context.c
View file @
2b86950c
...
...
@@ -116,15 +116,16 @@ static void context_destroy_fbo(struct wined3d_context *context, GLuint *fbo)
/* GL locking is done by the caller */
static
void
context_apply_attachment_filter_states
(
IWineD3DSurface
*
surface
)
{
const
IWineD3DSurfaceImpl
*
surface_impl
=
(
IWineD3DSurfaceImpl
*
)
surface
;
IWineD3DDeviceImpl
*
device
=
surface_impl
->
resource
.
device
;
IWineD3DBaseTextureImpl
*
texture_impl
;
BOOL
update_minfilter
=
FALSE
;
BOOL
update_magfilter
=
FALSE
;
/* Update base texture states array */
if
(
SUCCEEDED
(
IWineD3DSurface_GetContainer
(
surface
,
&
IID_IWineD3DBaseTexture
,
(
void
**
)
&
texture_impl
)))
{
IWineD3DSurfaceImpl
*
surface_impl
=
(
IWineD3DSurfaceImpl
*
)
surface
;
IWineD3DDeviceImpl
*
device
=
surface_impl
->
resource
.
device
;
BOOL
update_minfilter
=
FALSE
;
BOOL
update_magfilter
=
FALSE
;
if
(
texture_impl
->
baseTexture
.
texture_rgb
.
states
[
WINED3DTEXSTA_MINFILTER
]
!=
WINED3DTEXF_POINT
||
texture_impl
->
baseTexture
.
texture_rgb
.
states
[
WINED3DTEXSTA_MIPFILTER
]
!=
WINED3DTEXF_NONE
)
{
...
...
@@ -146,33 +147,37 @@ static void context_apply_attachment_filter_states(IWineD3DSurface *surface)
}
IWineD3DBaseTexture_Release
((
IWineD3DBaseTexture
*
)
texture_impl
);
}
if
(
update_minfilter
||
update_magfilter
)
{
GLenum
target
,
bind_target
;
GLint
old_binding
;
target
=
surface_impl
->
texture_target
;
if
(
target
==
GL_TEXTURE_2D
)
if
(
update_minfilter
||
update_magfilter
)
{
bind_target
=
GL_TEXTURE_2D
;
glGetIntegerv
(
GL_TEXTURE_BINDING_2D
,
&
old_binding
);
}
else
if
(
target
==
GL_TEXTURE_RECTANGLE_ARB
)
{
bind_target
=
GL_TEXTURE_RECTANGLE_ARB
;
glGetIntegerv
(
GL_TEXTURE_BINDING_RECTANGLE_ARB
,
&
old_binding
);
}
else
{
bind_target
=
GL_TEXTURE_CUBE_MAP_ARB
;
glGetIntegerv
(
GL_TEXTURE_BINDING_CUBE_MAP_ARB
,
&
old_binding
);
GLenum
target
,
bind_target
;
GLint
old_binding
;
target
=
surface_impl
->
texture_target
;
if
(
target
==
GL_TEXTURE_2D
)
{
bind_target
=
GL_TEXTURE_2D
;
glGetIntegerv
(
GL_TEXTURE_BINDING_2D
,
&
old_binding
);
}
else
if
(
target
==
GL_TEXTURE_RECTANGLE_ARB
)
{
bind_target
=
GL_TEXTURE_RECTANGLE_ARB
;
glGetIntegerv
(
GL_TEXTURE_BINDING_RECTANGLE_ARB
,
&
old_binding
);
}
else
{
bind_target
=
GL_TEXTURE_CUBE_MAP_ARB
;
glGetIntegerv
(
GL_TEXTURE_BINDING_CUBE_MAP_ARB
,
&
old_binding
);
}
glBindTexture
(
bind_target
,
surface_impl
->
texture_name
);
if
(
update_minfilter
)
glTexParameteri
(
bind_target
,
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
if
(
update_magfilter
)
glTexParameteri
(
bind_target
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
glBindTexture
(
bind_target
,
old_binding
);
}
glBindTexture
(
bind_target
,
surface_impl
->
texture_name
);
if
(
update_minfilter
)
glTexParameteri
(
bind_target
,
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
if
(
update_magfilter
)
glTexParameteri
(
bind_target
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
glBindTexture
(
bind_target
,
old_binding
);
checkGLcall
(
"apply_attachment_filter_states()"
);
}
checkGLcall
(
"apply_attachment_filter_states()"
);
}
/* GL locking is done by the caller */
...
...
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