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
c8480e25
Commit
c8480e25
authored
Feb 25, 2006
by
Vitaly Budovski
Committed by
Alexandre Julliard
Feb 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fixed some typos and prevented divide by 0.
parent
d6201e23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
device.c
dlls/wined3d/device.c
+21
-18
No files found.
dlls/wined3d/device.c
View file @
c8480e25
...
...
@@ -3502,7 +3502,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
{
/*
* POINTSCALEENABLE controls how point size value is treated. If set to
* true, the point size is scaled with re
ps
ect to height of viewport.
* true, the point size is scaled with re
sp
ect to height of viewport.
* When set to false point size is in pixels.
*
* http://msdn.microsoft.com/library/en-us/directx9_c/point_sprites.asp
...
...
@@ -3510,28 +3510,31 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
/* Default values */
GLfloat
att
[
3
]
=
{
1
.
0
f
,
0
.
0
f
,
0
.
0
f
};
/*
* Minium valid point size for OpenGL is 1.0f. For Direct3D it is 0.0f.
* Mini
m
um 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
* are less than 1.0f. scale_factor = 1.0f / point_size.
*/
GLfloat
pointSize
=
*
((
float
*
)
&
This
->
stateBlock
->
renderState
[
D3DRS_POINTSIZE
]);
GLfloat
scaleFactor
;
if
(
pointSize
<
1
.
0
f
)
{
scaleFactor
=
pointSize
*
pointSize
;
}
else
{
scaleFactor
=
1
.
0
f
;
}
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSCALEENABLE
])
{
att
[
0
]
=
*
((
float
*
)
&
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSCALE_A
])
/
(
This
->
stateBlock
->
viewport
.
Height
*
This
->
stateBlock
->
viewport
.
Height
*
scaleFactor
);
att
[
1
]
=
*
((
float
*
)
&
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSCALE_B
])
/
(
This
->
stateBlock
->
viewport
.
Height
*
This
->
stateBlock
->
viewport
.
Height
*
scaleFactor
);
att
[
2
]
=
*
((
float
*
)
&
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSCALE_C
])
/
(
This
->
stateBlock
->
viewport
.
Height
*
This
->
stateBlock
->
viewport
.
Height
*
scaleFactor
);
GLfloat
pointSize
=
*
((
float
*
)
&
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSIZE
]);
if
(
pointSize
>
0
.
0
f
)
{
GLfloat
scaleFactor
;
if
(
pointSize
<
1
.
0
f
)
{
scaleFactor
=
pointSize
*
pointSize
;
}
else
{
scaleFactor
=
1
.
0
f
;
}
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSCALEENABLE
])
{
att
[
0
]
=
*
((
float
*
)
&
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSCALE_A
])
/
(
This
->
stateBlock
->
viewport
.
Height
*
This
->
stateBlock
->
viewport
.
Height
*
scaleFactor
);
att
[
1
]
=
*
((
float
*
)
&
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSCALE_B
])
/
(
This
->
stateBlock
->
viewport
.
Height
*
This
->
stateBlock
->
viewport
.
Height
*
scaleFactor
);
att
[
2
]
=
*
((
float
*
)
&
This
->
stateBlock
->
renderState
[
WINED3DRS_POINTSCALE_C
])
/
(
This
->
stateBlock
->
viewport
.
Height
*
This
->
stateBlock
->
viewport
.
Height
*
scaleFactor
);
}
}
if
(
GL_SUPPORT
(
ARB_POINT_PARAMETERS
))
{
...
...
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