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
29f2fefc
Commit
29f2fefc
authored
Nov 19, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix the cube map coordinates in surface_blt_to_drawable().
I don't see how this can ever have worked properly.
parent
9f8ae26c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
24 deletions
+47
-24
surface.c
dlls/wined3d/surface.c
+47
-24
No files found.
dlls/wined3d/surface.c
View file @
29f2fefc
...
...
@@ -4265,6 +4265,22 @@ struct coords {
GLfloat
x
,
y
,
z
;
};
struct
float_rect
{
float
l
;
float
t
;
float
r
;
float
b
;
};
static
inline
void
cube_coords_float
(
const
RECT
*
r
,
UINT
w
,
UINT
h
,
struct
float_rect
*
f
)
{
f
->
l
=
((
r
->
left
*
2
.
0
f
)
/
w
)
-
1
.
0
f
;
f
->
t
=
((
r
->
top
*
2
.
0
f
)
/
h
)
-
1
.
0
f
;
f
->
r
=
((
r
->
right
*
2
.
0
f
)
/
w
)
-
1
.
0
f
;
f
->
b
=
((
r
->
bottom
*
2
.
0
f
)
/
h
)
-
1
.
0
f
;
}
static
inline
void
surface_blt_to_drawable
(
IWineD3DSurfaceImpl
*
This
,
const
RECT
*
rect_in
)
{
struct
coords
coords
[
4
];
RECT
rect
;
...
...
@@ -4272,6 +4288,7 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
IWineD3DBaseTexture
*
texture
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
GLenum
bind_target
;
struct
float_rect
f
;
if
(
rect_in
)
{
rect
=
*
rect_in
;
...
...
@@ -4314,50 +4331,56 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
case
GL_TEXTURE_CUBE_MAP_POSITIVE_X
:
bind_target
=
GL_TEXTURE_CUBE_MAP_ARB
;
coords
[
0
].
x
=
1
;
coords
[
0
].
y
=
-
1
;
coords
[
0
].
z
=
1
;
coords
[
1
].
x
=
1
;
coords
[
1
].
y
=
1
;
coords
[
1
].
z
=
1
;
coords
[
2
].
x
=
1
;
coords
[
2
].
y
=
1
;
coords
[
2
].
z
=
-
1
;
coords
[
3
].
x
=
1
;
coords
[
3
].
y
=
-
1
;
coords
[
3
].
z
=
-
1
;
cube_coords_float
(
&
rect
,
This
->
pow2Width
,
This
->
pow2Height
,
&
f
);
coords
[
0
].
x
=
1
;
coords
[
0
].
y
=
-
f
.
t
;
coords
[
0
].
z
=
-
f
.
l
;
coords
[
1
].
x
=
1
;
coords
[
1
].
y
=
-
f
.
b
;
coords
[
1
].
z
=
-
f
.
l
;
coords
[
2
].
x
=
1
;
coords
[
2
].
y
=
-
f
.
b
;
coords
[
2
].
z
=
-
f
.
r
;
coords
[
3
].
x
=
1
;
coords
[
3
].
y
=
-
f
.
t
;
coords
[
3
].
z
=
-
f
.
r
;
break
;
case
GL_TEXTURE_CUBE_MAP_NEGATIVE_X
:
bind_target
=
GL_TEXTURE_CUBE_MAP_ARB
;
coords
[
0
].
x
=
-
1
;
coords
[
0
].
y
=
-
1
;
coords
[
0
].
z
=
1
;
coords
[
1
].
x
=
-
1
;
coords
[
1
].
y
=
1
;
coords
[
1
].
z
=
1
;
coords
[
2
].
x
=
-
1
;
coords
[
2
].
y
=
1
;
coords
[
2
].
z
=
-
1
;
coords
[
3
].
x
=
-
1
;
coords
[
3
].
y
=
-
1
;
coords
[
3
].
z
=
-
1
;
cube_coords_float
(
&
rect
,
This
->
pow2Width
,
This
->
pow2Height
,
&
f
);
coords
[
0
].
x
=
-
1
;
coords
[
0
].
y
=
-
f
.
t
;
coords
[
0
].
z
=
f
.
l
;
coords
[
1
].
x
=
-
1
;
coords
[
1
].
y
=
-
f
.
b
;
coords
[
1
].
z
=
f
.
l
;
coords
[
2
].
x
=
-
1
;
coords
[
2
].
y
=
-
f
.
b
;
coords
[
2
].
z
=
f
.
r
;
coords
[
3
].
x
=
-
1
;
coords
[
3
].
y
=
-
f
.
t
;
coords
[
3
].
z
=
f
.
r
;
break
;
case
GL_TEXTURE_CUBE_MAP_POSITIVE_Y
:
bind_target
=
GL_TEXTURE_CUBE_MAP_ARB
;
coords
[
0
].
x
=
-
1
;
coords
[
0
].
y
=
1
;
coords
[
0
].
z
=
1
;
coords
[
1
].
x
=
1
;
coords
[
1
].
y
=
1
;
coords
[
1
].
z
=
1
;
coords
[
2
].
x
=
1
;
coords
[
2
].
y
=
1
;
coords
[
2
].
z
=
-
1
;
coords
[
3
].
x
=
-
1
;
coords
[
3
].
y
=
1
;
coords
[
3
].
z
=
-
1
;
cube_coords_float
(
&
rect
,
This
->
pow2Width
,
This
->
pow2Height
,
&
f
);
coords
[
0
].
x
=
f
.
l
;
coords
[
0
].
y
=
1
;
coords
[
0
].
z
=
f
.
t
;
coords
[
1
].
x
=
f
.
l
;
coords
[
1
].
y
=
1
;
coords
[
1
].
z
=
f
.
b
;
coords
[
2
].
x
=
f
.
r
;
coords
[
2
].
y
=
1
;
coords
[
2
].
z
=
f
.
b
;
coords
[
3
].
x
=
f
.
r
;
coords
[
3
].
y
=
1
;
coords
[
3
].
z
=
f
.
t
;
break
;
case
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
:
bind_target
=
GL_TEXTURE_CUBE_MAP_ARB
;
coords
[
0
].
x
=
-
1
;
coords
[
0
].
y
=
-
1
;
coords
[
0
].
z
=
1
;
coords
[
1
].
x
=
1
;
coords
[
1
].
y
=
-
1
;
coords
[
1
].
z
=
1
;
coords
[
2
].
x
=
1
;
coords
[
2
].
y
=
-
1
;
coords
[
2
].
z
=
-
1
;
coords
[
3
].
x
=
-
1
;
coords
[
3
].
y
=
-
1
;
coords
[
3
].
z
=
-
1
;
cube_coords_float
(
&
rect
,
This
->
pow2Width
,
This
->
pow2Height
,
&
f
);
coords
[
0
].
x
=
f
.
l
;
coords
[
0
].
y
=
-
1
;
coords
[
0
].
z
=
-
f
.
t
;
coords
[
1
].
x
=
f
.
l
;
coords
[
1
].
y
=
-
1
;
coords
[
1
].
z
=
-
f
.
b
;
coords
[
2
].
x
=
f
.
r
;
coords
[
2
].
y
=
-
1
;
coords
[
2
].
z
=
-
f
.
b
;
coords
[
3
].
x
=
f
.
r
;
coords
[
3
].
y
=
-
1
;
coords
[
3
].
z
=
-
f
.
t
;
break
;
case
GL_TEXTURE_CUBE_MAP_POSITIVE_Z
:
bind_target
=
GL_TEXTURE_CUBE_MAP_ARB
;
coords
[
0
].
x
=
-
1
;
coords
[
0
].
y
=
-
1
;
coords
[
0
].
z
=
1
;
coords
[
1
].
x
=
1
;
coords
[
1
].
y
=
-
1
;
coords
[
1
].
z
=
1
;
coords
[
2
].
x
=
1
;
coords
[
2
].
y
=
-
1
;
coords
[
2
].
z
=
1
;
coords
[
3
].
x
=
-
1
;
coords
[
3
].
y
=
-
1
;
coords
[
3
].
z
=
1
;
cube_coords_float
(
&
rect
,
This
->
pow2Width
,
This
->
pow2Height
,
&
f
);
coords
[
0
].
x
=
f
.
l
;
coords
[
0
].
y
=
-
f
.
t
;
coords
[
0
].
z
=
1
;
coords
[
1
].
x
=
f
.
l
;
coords
[
1
].
y
=
-
f
.
b
;
coords
[
1
].
z
=
1
;
coords
[
2
].
x
=
f
.
r
;
coords
[
2
].
y
=
-
f
.
b
;
coords
[
2
].
z
=
1
;
coords
[
3
].
x
=
f
.
r
;
coords
[
3
].
y
=
-
f
.
t
;
coords
[
3
].
z
=
1
;
break
;
case
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
:
bind_target
=
GL_TEXTURE_CUBE_MAP_ARB
;
coords
[
0
].
x
=
-
1
;
coords
[
0
].
y
=
-
1
;
coords
[
0
].
z
=
-
1
;
coords
[
1
].
x
=
1
;
coords
[
1
].
y
=
-
1
;
coords
[
1
].
z
=
-
1
;
coords
[
2
].
x
=
1
;
coords
[
2
].
y
=
-
1
;
coords
[
2
].
z
=
-
1
;
coords
[
3
].
x
=
-
1
;
coords
[
3
].
y
=
-
1
;
coords
[
3
].
z
=
-
1
;
cube_coords_float
(
&
rect
,
This
->
pow2Width
,
This
->
pow2Height
,
&
f
);
coords
[
0
].
x
=
-
f
.
l
;
coords
[
0
].
y
=
-
f
.
t
;
coords
[
0
].
z
=
-
1
;
coords
[
1
].
x
=
-
f
.
l
;
coords
[
1
].
y
=
-
f
.
b
;
coords
[
1
].
z
=
-
1
;
coords
[
2
].
x
=
-
f
.
r
;
coords
[
2
].
y
=
-
f
.
b
;
coords
[
2
].
z
=
-
1
;
coords
[
3
].
x
=
-
f
.
r
;
coords
[
3
].
y
=
-
f
.
t
;
coords
[
3
].
z
=
-
1
;
break
;
default:
...
...
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