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
37491bb5
Commit
37491bb5
authored
Jun 22, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simplify the transformed position fixup a bit.
parent
75b89c93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
22 deletions
+13
-22
buffer.c
dlls/wined3d/buffer.c
+7
-19
directx.c
dlls/wined3d/directx.c
+6
-3
No files found.
dlls/wined3d/buffer.c
View file @
37491bb5
...
...
@@ -506,27 +506,15 @@ static inline void fixup_d3dcolor(DWORD *dst_color)
static
inline
void
fixup_transformed_pos
(
float
*
p
)
{
float
x
,
y
,
z
,
w
;
/* rhw conversion like in drawStridedSlow */
if
(
p
[
3
]
==
1
.
0
||
((
p
[
3
]
<
eps
)
&&
(
p
[
3
]
>
-
eps
)))
{
x
=
p
[
0
];
y
=
p
[
1
];
z
=
p
[
2
];
w
=
1
.
0
;
}
else
/* rhw conversion like in position_float4(). */
if
(
p
[
3
]
!=
1
.
0
&&
p
[
3
]
!=
0
.
0
)
{
w
=
1
.
0
/
p
[
3
];
x
=
p
[
0
]
*
w
;
y
=
p
[
1
]
*
w
;
z
=
p
[
2
]
*
w
;
float
w
=
1
.
0
/
p
[
3
];
p
[
0
]
*=
w
;
p
[
1
]
*=
w
;
p
[
2
]
*=
w
;
p
[
3
]
=
w
;
}
p
[
0
]
=
x
;
p
[
1
]
=
y
;
p
[
2
]
=
z
;
p
[
3
]
=
w
;
}
const
BYTE
*
buffer_get_memory
(
IWineD3DBuffer
*
iface
,
UINT
offset
,
GLuint
*
buffer_object
)
...
...
dlls/wined3d/directx.c
View file @
37491bb5
...
...
@@ -4316,13 +4316,16 @@ static void WINE_GLAPI position_float4(const void *data)
{
const
GLfloat
*
pos
=
data
;
if
(
pos
[
3
]
<
eps
&&
pos
[
3
]
>
-
eps
)
glVertex3fv
(
pos
);
else
{
if
(
pos
[
3
]
!=
0
.
0
&&
pos
[
3
]
!=
1
.
0
)
{
float
w
=
1
.
0
/
pos
[
3
];
glVertex4f
(
pos
[
0
]
*
w
,
pos
[
1
]
*
w
,
pos
[
2
]
*
w
,
w
);
}
else
{
glVertex3fv
(
pos
);
}
}
static
void
WINE_GLAPI
diffuse_d3dcolor
(
const
void
*
data
)
...
...
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