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
36520c3e
Commit
36520c3e
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: Introduce a get_pointsize_minmax() function.
parent
b551da8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
42 deletions
+35
-42
state.c
dlls/wined3d/state.c
+14
-42
utils.c
dlls/wined3d/utils.c
+19
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/state.c
View file @
36520c3e
...
...
@@ -1419,67 +1419,39 @@ static void state_normalize(struct wined3d_context *context, const struct wined3
void
state_psizemin_w
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
union
{
DWORD
d
;
float
f
;
}
tmpvalue
;
float
min
,
max
;
tmpvalue
.
d
=
state
->
render_states
[
WINED3D_RS_POINTSIZE_MIN
];
if
(
tmpvalue
.
f
!=
1
.
0
f
)
{
FIXME
(
"WINED3D_RS_POINTSIZE_MIN not supported on this opengl, value is %f
\n
"
,
tmpvalue
.
f
);
}
tmpvalue
.
d
=
state
->
render_states
[
WINED3D_RS_POINTSIZE_MAX
];
if
(
tmpvalue
.
f
!=
64
.
0
f
)
{
FIXME
(
"WINED3D_RS_POINTSIZE_MAX not supported on this opengl, value is %f
\n
"
,
tmpvalue
.
f
);
}
get_pointsize_minmax
(
context
,
state
,
&
min
,
&
max
);
if
(
min
!=
1
.
0
f
)
FIXME
(
"WINED3D_RS_POINTSIZE_MIN value %.8e not supported on this OpenGL implementation.
\n
"
,
min
);
if
(
max
!=
64
.
0
f
)
FIXME
(
"WINED3D_RS_POINTSIZE_MAX value %.8e not supported on this OpenGL implementation.
\n
"
,
max
);
}
void
state_psizemin_ext
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
union
{
DWORD
d
;
float
f
;
}
min
,
max
;
float
min
,
max
;
min
.
d
=
state
->
render_states
[
WINED3D_RS_POINTSIZE_MIN
];
max
.
d
=
state
->
render_states
[
WINED3D_RS_POINTSIZE_MAX
];
get_pointsize_minmax
(
context
,
state
,
&
min
,
&
max
);
/* Max point size trumps min point size */
if
(
min
.
f
>
max
.
f
)
{
min
.
f
=
max
.
f
;
}
GL_EXTCALL
(
glPointParameterfEXT
)(
GL_POINT_SIZE_MIN_EXT
,
min
.
f
);
GL_EXTCALL
(
glPointParameterfEXT
)(
GL_POINT_SIZE_MIN_EXT
,
min
);
checkGLcall
(
"glPointParameterfEXT(...)"
);
GL_EXTCALL
(
glPointParameterfEXT
)(
GL_POINT_SIZE_MAX_EXT
,
max
.
f
);
GL_EXTCALL
(
glPointParameterfEXT
)(
GL_POINT_SIZE_MAX_EXT
,
max
);
checkGLcall
(
"glPointParameterfEXT(...)"
);
}
void
state_psizemin_arb
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
union
{
DWORD
d
;
float
f
;
}
min
,
max
;
float
min
,
max
;
min
.
d
=
state
->
render_states
[
WINED3D_RS_POINTSIZE_MIN
];
max
.
d
=
state
->
render_states
[
WINED3D_RS_POINTSIZE_MAX
];
/* Max point size trumps min point size */
if
(
min
.
f
>
max
.
f
)
{
min
.
f
=
max
.
f
;
}
get_pointsize_minmax
(
context
,
state
,
&
min
,
&
max
);
GL_EXTCALL
(
glPointParameterfARB
)(
GL_POINT_SIZE_MIN_ARB
,
min
.
f
);
GL_EXTCALL
(
glPointParameterfARB
)(
GL_POINT_SIZE_MIN_ARB
,
min
);
checkGLcall
(
"glPointParameterfARB(...)"
);
GL_EXTCALL
(
glPointParameterfARB
)(
GL_POINT_SIZE_MAX_ARB
,
max
.
f
);
GL_EXTCALL
(
glPointParameterfARB
)(
GL_POINT_SIZE_MAX_ARB
,
max
);
checkGLcall
(
"glPointParameterfARB(...)"
);
}
...
...
dlls/wined3d/utils.c
View file @
36520c3e
...
...
@@ -3603,6 +3603,25 @@ void get_texture_matrix(const struct wined3d_context *context, const struct wine
}
}
void
get_pointsize_minmax
(
const
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
float
*
out_min
,
float
*
out_max
)
{
union
{
DWORD
d
;
float
f
;
}
min
,
max
;
min
.
d
=
state
->
render_states
[
WINED3D_RS_POINTSIZE_MIN
];
max
.
d
=
state
->
render_states
[
WINED3D_RS_POINTSIZE_MAX
];
if
(
min
.
f
>
max
.
f
)
min
.
f
=
max
.
f
;
*
out_min
=
min
.
f
;
*
out_max
=
max
.
f
;
}
/* This small helper function is used to convert a bitmask into the number of masked bits */
unsigned
int
count_bits
(
unsigned
int
mask
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
36520c3e
...
...
@@ -3070,6 +3070,8 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
struct
wined3d_matrix
*
mat
)
DECLSPEC_HIDDEN
;
void
get_texture_matrix
(
const
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
unsigned
int
tex
,
struct
wined3d_matrix
*
mat
)
DECLSPEC_HIDDEN
;
void
get_pointsize_minmax
(
const
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
float
*
out_min
,
float
*
out_max
)
DECLSPEC_HIDDEN
;
/* Using additional shader constants (uniforms in GLSL / program environment
* or local parameters in ARB) is costly:
...
...
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