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
27132a30
Commit
27132a30
authored
Nov 01, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Construct the non-rhw projection matrix directly in transform_projection().
parent
6e7f33a7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
32 deletions
+14
-32
state.c
dlls/wined3d/state.c
+14
-32
No files found.
dlls/wined3d/state.c
View file @
27132a30
...
...
@@ -3930,39 +3930,21 @@ static void transform_projection(struct wined3d_context *context, const struct w
}
else
{
/*
* Careful with the order of operations here, we're essentially working backwards:
* x = x + 1/w;
* y = (y - 1/h) * flip;
* z = z * 2 - 1;
*
* Becomes:
* glTranslatef(0.0, 0.0, -1.0);
* glScalef(1.0, 1.0, 2.0);
*
* glScalef(1.0, flip, 1.0);
* glTranslatef(1/w, -1/h, 0.0);
*
* This is equivalent to:
* glTranslatef(1/w, -flip/h, -1.0)
* glScalef(1.0, flip, 2.0);
*/
GLfloat
xoffset
=
(
63
.
0
f
/
64
.
0
f
)
/
state
->
viewport
.
Width
;
GLfloat
yoffset
=
-
(
63
.
0
f
/
64
.
0
f
)
/
state
->
viewport
.
Height
;
glLoadIdentity
();
checkGLcall
(
"glLoadIdentity"
);
if
(
context
->
render_offscreen
)
double
y_scale
=
context
->
render_offscreen
?
-
1
.
0
:
1
.
0
;
double
x_offset
=
(
63
.
0
/
64
.
0
)
/
state
->
viewport
.
Width
;
double
y_offset
=
context
->
render_offscreen
?
(
63
.
0
/
64
.
0
)
/
state
->
viewport
.
Height
:
-
(
63
.
0
/
64
.
0
)
/
state
->
viewport
.
Height
;
const
GLdouble
projection
[]
=
{
glTranslatef
(
xoffset
,
-
yoffset
,
-
1
.
0
f
);
checkGLcall
(
"glTranslatef(xoffset, -yoffset, -1.0f)"
);
glScalef
(
1
.
0
f
,
-
1
.
0
f
,
2
.
0
f
);
}
else
{
glTranslatef
(
xoffset
,
yoffset
,
-
1
.
0
f
);
checkGLcall
(
"glTranslatef(xoffset, yoffset, -1.0f)"
);
glScalef
(
1
.
0
f
,
1
.
0
f
,
2
.
0
f
);
}
checkGLcall
(
"glScalef"
);
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
y_scale
,
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
2
.
0
,
0
.
0
,
x_offset
,
y_offset
,
-
1
.
0
,
1
.
0
,
};
glLoadMatrixd
(
projection
);
checkGLcall
(
"glLoadMatrixd"
);
glMultMatrixf
(
&
state
->
transforms
[
WINED3DTS_PROJECTION
].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glLoadMatrixf"
);
...
...
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