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
5ffea6e5
Commit
5ffea6e5
authored
Nov 03, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Honor the driver's min point size.
parent
0183f3e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
directx.c
dlls/wined3d/directx.c
+1
-0
state.c
dlls/wined3d/state.c
+9
-5
wined3d_gl.h
include/wine/wined3d_gl.h
+4
-2
No files found.
dlls/wined3d/directx.c
View file @
5ffea6e5
...
...
@@ -641,6 +641,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
TRACE_
(
d3d_caps
)(
"Maximum texture size support - max texture size=%d
\n
"
,
gl_max
);
glGetFloatv
(
GL_POINT_SIZE_RANGE
,
gl_floatv
);
gl_info
->
max_pointsizemin
=
gl_floatv
[
0
];
gl_info
->
max_pointsize
=
gl_floatv
[
1
];
TRACE_
(
d3d_caps
)(
"Maximum point size support - max point size=%f
\n
"
,
gl_floatv
[
1
]);
...
...
dlls/wined3d/state.c
View file @
5ffea6e5
...
...
@@ -1312,14 +1312,18 @@ static void state_pscale(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3
GLfloat
scaleFactor
;
float
h
=
stateblock
->
viewport
.
Height
;
if
(
pointSize
.
f
<
1
.
0
f
)
{
if
(
pointSize
.
f
<
GL_LIMITS
(
pointsizemin
)
)
{
/*
* Minimum valid point size for OpenGL is
1.0f. For Direct3D it is 0.0f.
*
This means that OpenGL will clamp really small point sizes to 1.0f.
* To correct for this we need to multiply by the scale factor when sizes
* 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
;
scaleFactor
=
pointSize
.
f
/
GL_LIMITS
(
pointsizemin
);
/* 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_LIMITS
(
pointsizemin
);
}
else
if
(
pointSize
.
f
>
GL_LIMITS
(
pointsize
))
{
/* gl already scales the input to glPointSize,
* d3d scales the result after the point size scale.
...
...
include/wine/wined3d_gl.h
View file @
5ffea6e5
...
...
@@ -1137,6 +1137,7 @@ void (WINE_GLAPI *glVertex4s) (GLshort x, GLshort y, GLshort z, GLshort w);
void
(
WINE_GLAPI
*
glVertex4sv
)
(
const
GLshort
*
v
);
void
(
WINE_GLAPI
*
glVertexPointer
)
(
GLint
size
,
GLenum
type
,
GLsizei
stride
,
const
GLvoid
*
pointer
);
void
(
WINE_GLAPI
*
glViewport
)
(
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
);
void
(
WINE_GLAPI
*
glPointParameterfv
)
(
GLenum
pname
,
const
GLfloat
*
params
);
/* WGL functions */
HGLRC
(
WINAPI
*
pwglCreateContext
)(
HDC
);
...
...
@@ -1483,7 +1484,8 @@ BOOL (WINAPI *pwglShareLists)(HGLRC,HGLRC);
USE_GL_FUNC(glVertex4s) \
USE_GL_FUNC(glVertex4sv) \
USE_GL_FUNC(glVertexPointer) \
USE_GL_FUNC(glViewport)
USE_GL_FUNC(glViewport) \
USE_GL_FUNC(glPointParameterfv) \
#define WGL_FUNCS_GEN \
USE_WGL_FUNC(wglCreateContext) \
...
...
@@ -3719,7 +3721,7 @@ typedef struct _WineD3D_GL_Info {
UINT
max_clipplanes
;
UINT
max_texture_size
;
UINT
max_texture3d_size
;
float
max_pointsize
;
float
max_pointsize
,
max_pointsizemin
;
UINT
max_blends
;
UINT
max_anisotropy
;
UINT
max_aux_buffers
;
...
...
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