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
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
...
@@ -3930,39 +3930,21 @@ static void transform_projection(struct wined3d_context *context, const struct w
}
}
else
else
{
{
/*
double
y_scale
=
context
->
render_offscreen
?
-
1
.
0
:
1
.
0
;
* Careful with the order of operations here, we're essentially working backwards:
double
x_offset
=
(
63
.
0
/
64
.
0
)
/
state
->
viewport
.
Width
;
* x = x + 1/w;
double
y_offset
=
context
->
render_offscreen
* y = (y - 1/h) * flip;
?
(
63
.
0
/
64
.
0
)
/
state
->
viewport
.
Height
* z = z * 2 - 1;
:
-
(
63
.
0
/
64
.
0
)
/
state
->
viewport
.
Height
;
*
const
GLdouble
projection
[]
=
* 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
)
{
{
glTranslatef
(
xoffset
,
-
yoffset
,
-
1
.
0
f
);
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
,
checkGLcall
(
"glTranslatef(xoffset, -yoffset, -1.0f)"
);
0
.
0
,
y_scale
,
0
.
0
,
0
.
0
,
glScalef
(
1
.
0
f
,
-
1
.
0
f
,
2
.
0
f
);
0
.
0
,
0
.
0
,
2
.
0
,
0
.
0
,
}
else
{
x_offset
,
y_offset
,
-
1
.
0
,
1
.
0
,
glTranslatef
(
xoffset
,
yoffset
,
-
1
.
0
f
);
};
checkGLcall
(
"glTranslatef(xoffset, yoffset, -1.0f)"
);
glScalef
(
1
.
0
f
,
1
.
0
f
,
2
.
0
f
);
glLoadMatrixd
(
projection
);
}
checkGLcall
(
"glLoadMatrixd"
);
checkGLcall
(
"glScalef"
);
glMultMatrixf
(
&
state
->
transforms
[
WINED3DTS_PROJECTION
].
u
.
m
[
0
][
0
]);
glMultMatrixf
(
&
state
->
transforms
[
WINED3DTS_PROJECTION
].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glLoadMatrixf"
);
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