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
3b2ac77e
Commit
3b2ac77e
authored
Oct 08, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set the correct pow2Matrix for cube textures when NPOT textures are supported.
parent
8985b7a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
device.c
dlls/wined3d/device.c
+14
-8
No files found.
dlls/wined3d/device.c
View file @
3b2ac77e
...
...
@@ -1077,19 +1077,25 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
TRACE
(
"(%p) Create Cube Texture
\n
"
,
This
);
/** Non-power2 support **/
/* Find the nearest pow2 match */
pow2EdgeLength
=
1
;
while
(
pow2EdgeLength
<
EdgeLength
)
pow2EdgeLength
<<=
1
;
object
->
edgeLength
=
EdgeLength
;
/* TODO: support for native non-power 2 */
/* Precalculated scaling for 'faked' non power of two texture coords */
object
->
baseTexture
.
pow2Matrix
[
0
]
=
((
float
)
EdgeLength
)
/
((
float
)
pow2EdgeLength
);
object
->
baseTexture
.
pow2Matrix
[
5
]
=
((
float
)
EdgeLength
)
/
((
float
)
pow2EdgeLength
);
object
->
baseTexture
.
pow2Matrix
[
10
]
=
((
float
)
EdgeLength
)
/
((
float
)
pow2EdgeLength
);
object
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
;
if
(
GL_SUPPORT
(
ARB_TEXTURE_NON_POWER_OF_TWO
))
{
/* Precalculated scaling for 'faked' non power of two texture coords */
object
->
baseTexture
.
pow2Matrix
[
0
]
=
1
.
0
;
object
->
baseTexture
.
pow2Matrix
[
5
]
=
1
.
0
;
object
->
baseTexture
.
pow2Matrix
[
10
]
=
1
.
0
;
object
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
;
}
else
{
/* Precalculated scaling for 'faked' non power of two texture coords */
object
->
baseTexture
.
pow2Matrix
[
0
]
=
((
float
)
EdgeLength
)
/
((
float
)
pow2EdgeLength
);
object
->
baseTexture
.
pow2Matrix
[
5
]
=
((
float
)
EdgeLength
)
/
((
float
)
pow2EdgeLength
);
object
->
baseTexture
.
pow2Matrix
[
10
]
=
((
float
)
EdgeLength
)
/
((
float
)
pow2EdgeLength
);
object
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
;
}
if
(
glDesc
->
Flags
&
WINED3DFMT_FLAG_FILTERING
)
{
object
->
baseTexture
.
minMipLookup
=
&
minMipLookup
;
...
...
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