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
b551da8e
Commit
b551da8e
authored
May 28, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
May 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove point size scaling hack.
Not sure how this was supposed to work, according to the GL spec the clamping to POINT_SIZE_RANGE happens after the scaling is applied.
parent
e35e107e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
34 deletions
+5
-34
state.c
dlls/wined3d/state.c
+5
-34
No files found.
dlls/wined3d/state.c
View file @
b551da8e
...
...
@@ -1507,40 +1507,11 @@ void state_pscale(struct wined3d_context *context, const struct wined3d_state *s
if
(
state
->
render_states
[
WINED3D_RS_POINTSCALEENABLE
])
{
DWORD
h
=
state
->
viewport
.
height
;
GLfloat
scaleFactor
;
float
scale_factor
=
state
->
viewport
.
height
*
state
->
viewport
.
height
;
if
(
pointSize
.
f
<
gl_info
->
limits
.
pointsize_min
)
{
/* Minimum valid point size for OpenGL is driver specific. For Direct3D it is
* 0.0f. This means that OpenGL will clamp really small point sizes to the
* driver minimum. To correct for this we need to multiply by the scale factor when sizes
* are less than 1.0f. scale_factor = 1.0f / point_size.
*/
scaleFactor
=
pointSize
.
f
/
gl_info
->
limits
.
pointsize_min
;
/* Clamp the point size, don't rely on the driver to do it. MacOS says min point size
* is 1.0, but then accepts points below that and draws too small points
*/
pointSize
.
f
=
gl_info
->
limits
.
pointsize_min
;
}
else
if
(
pointSize
.
f
>
gl_info
->
limits
.
pointsize_max
)
{
/* gl already scales the input to glPointSize,
* d3d scales the result after the point size scale.
* If the point size is bigger than the max size, use the
* scaling to scale it bigger, and set the gl point size to max
*/
scaleFactor
=
pointSize
.
f
/
gl_info
->
limits
.
pointsize_max
;
TRACE
(
"scale: %f
\n
"
,
scaleFactor
);
pointSize
.
f
=
gl_info
->
limits
.
pointsize_max
;
}
else
{
scaleFactor
=
1
.
0
f
;
}
scaleFactor
=
powf
(
h
*
scaleFactor
,
2
);
att
[
0
]
=
A
.
f
/
scaleFactor
;
att
[
1
]
=
B
.
f
/
scaleFactor
;
att
[
2
]
=
C
.
f
/
scaleFactor
;
att
[
0
]
=
A
.
f
/
scale_factor
;
att
[
1
]
=
B
.
f
/
scale_factor
;
att
[
2
]
=
C
.
f
/
scale_factor
;
}
if
(
gl_info
->
supported
[
ARB_POINT_PARAMETERS
])
...
...
@@ -1558,7 +1529,7 @@ void state_pscale(struct wined3d_context *context, const struct wined3d_state *s
WARN
(
"POINT_PARAMETERS not supported in this version of opengl
\n
"
);
}
gl_info
->
gl_ops
.
gl
.
p_glPointSize
(
pointSize
.
f
);
gl_info
->
gl_ops
.
gl
.
p_glPointSize
(
max
(
pointSize
.
f
,
FLT_MIN
)
);
checkGLcall
(
"glPointSize(...);"
);
}
...
...
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