Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c72c70d6
Commit
c72c70d6
authored
Jul 16, 2008
by
H. Verbeet
Committed by
Alexandre Julliard
Jul 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the texture in a local variable in sampler_texmatrix().
Slightly improves readability.
parent
5fff29cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
state.c
dlls/wined3d/state.c
+5
-4
No files found.
dlls/wined3d/state.c
View file @
c72c70d6
...
...
@@ -2308,8 +2308,9 @@ static void tex_bumpenvloffset(DWORD state, IWineD3DStateBlockImpl *stateblock,
static
void
sampler_texmatrix
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
BOOL
texIsPow2
=
FALSE
;
DWORD
sampler
=
state
-
STATE_SAMPLER
(
0
);
IWineD3DBaseTexture
*
texture
=
stateblock
->
textures
[
sampler
];
if
(
!
stateblock
->
textures
[
sampler
]
)
return
;
if
(
!
texture
)
return
;
/* The fixed function np2 texture emulation uses the texture matrix to fix up the coordinates
* IWineD3DBaseTexture::ApplyStateChanges multiplies the set matrix with a fixup matrix. Before the
* scaling is reapplied or removed, the texture matrix has to be reapplied
...
...
@@ -2320,12 +2321,12 @@ static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, W
if
(
!
GL_SUPPORT
(
ARB_TEXTURE_NON_POWER_OF_TWO
)
&&
sampler
<
MAX_TEXTURES
)
{
if
(
stateblock
->
textureDimensions
[
sampler
]
==
GL_TEXTURE_2D
||
stateblock
->
textureDimensions
[
sampler
]
==
GL_TEXTURE_RECTANGLE_ARB
)
{
if
(((
IWineD3DTextureImpl
*
)
stateblock
->
textures
[
sampler
]
)
->
baseTexture
.
pow2Matrix
[
0
]
!=
1
.
0
||
((
IWineD3DTextureImpl
*
)
stateblock
->
textures
[
sampler
]
)
->
baseTexture
.
pow2Matrix
[
5
]
!=
1
.
0
)
{
if
(((
IWineD3DTextureImpl
*
)
texture
)
->
baseTexture
.
pow2Matrix
[
0
]
!=
1
.
0
||
((
IWineD3DTextureImpl
*
)
texture
)
->
baseTexture
.
pow2Matrix
[
5
]
!=
1
.
0
)
{
texIsPow2
=
TRUE
;
}
}
else
if
(
stateblock
->
textureDimensions
[
sampler
]
==
GL_TEXTURE_CUBE_MAP_ARB
)
{
if
(((
IWineD3DCubeTextureImpl
*
)
stateblock
->
textures
[
sampler
]
)
->
baseTexture
.
pow2Matrix
[
0
]
!=
1
.
0
)
{
if
(((
IWineD3DCubeTextureImpl
*
)
texture
)
->
baseTexture
.
pow2Matrix
[
0
]
!=
1
.
0
)
{
texIsPow2
=
TRUE
;
}
}
...
...
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