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
14231aa8
Commit
14231aa8
authored
Oct 30, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
Oct 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct writing to back buffer in non-ortho mode, and ensure the line
stipple is passed correctly to enable proper wireframe support.
parent
59022e58
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
2 deletions
+40
-2
device.c
dlls/d3d8/device.c
+1
-1
stateblock.c
dlls/d3d8/stateblock.c
+1
-1
surface.c
dlls/d3d8/surface.c
+38
-0
No files found.
dlls/d3d8/device.c
View file @
14231aa8
...
...
@@ -3121,7 +3121,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD
checkGLcall
(
"Disable oldTextureDimensions"
);
if
(
This
->
StateBlock
->
texture_state
[
Stage
][
D3DTSS_COLOROP
]
!=
D3DTOP_DISABLE
)
{
glEnable
(
This
->
UpdateStateBlock
->
textureDimensions
[
Stage
]);
checkGLcall
(
"
Dis
able new texture dimensions"
);
checkGLcall
(
"
glEn
able new texture dimensions"
);
}
/* If Alpha arg1 is texture then handle the special case when there changes between a
...
...
dlls/d3d8/stateblock.c
View file @
14231aa8
...
...
@@ -80,7 +80,7 @@ HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* T
}
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FILLMODE
,
D3DFILL_SOLID
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_SHADEMODE
,
D3DSHADE_GOURAUD
);
lp
.
wRepeatFactor
=
0
;
lp
.
wLinePattern
=
0
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_LINEPATTERN
,
(
DWORD
)
&
lp
);
lp
.
wRepeatFactor
=
0
;
lp
.
wLinePattern
=
0
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_LINEPATTERN
,
*
(
DWORD
*
)
&
lp
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ZWRITEENABLE
,
TRUE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ALPHATESTENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_LASTPIXEL
,
TRUE
);
...
...
dlls/d3d8/surface.c
View file @
14231aa8
...
...
@@ -330,6 +330,44 @@ HRESULT WINAPI IDirect3DSurface8Impl_UnlockRect(LPDIRECT3DSURFACE8 iface) {
glPixelZoom
(
1
.
0
,
-
1
.
0
);
vcheckGLcall
(
"glPixelZoom"
);
/* glDrawPixels transforms the raster position as though it was a vertex -
we want to draw at screen position 0,0 - Set up ortho (rhw) mode as
per drawprim (and leave set - it will sort itself out due to last_was_rhw */
if
(
!
This
->
Device
->
last_was_rhw
)
{
double
X
,
Y
,
height
,
width
,
minZ
,
maxZ
;
This
->
Device
->
last_was_rhw
=
TRUE
;
/* Transformed already into viewport coordinates, so we do not need transform
matrices. Reset all matrices to identity and leave the default matrix in world
mode. */
glMatrixMode
(
GL_MODELVIEW
);
checkGLcall
(
"glMatrixMode"
);
glLoadIdentity
();
checkGLcall
(
"glLoadIdentity"
);
glMatrixMode
(
GL_PROJECTION
);
checkGLcall
(
"glMatrixMode"
);
glLoadIdentity
();
checkGLcall
(
"glLoadIdentity"
);
/* Set up the viewport to be full viewport */
X
=
This
->
Device
->
StateBlock
->
viewport
.
X
;
Y
=
This
->
Device
->
StateBlock
->
viewport
.
Y
;
height
=
This
->
Device
->
StateBlock
->
viewport
.
Height
;
width
=
This
->
Device
->
StateBlock
->
viewport
.
Width
;
minZ
=
This
->
Device
->
StateBlock
->
viewport
.
MinZ
;
maxZ
=
This
->
Device
->
StateBlock
->
viewport
.
MaxZ
;
TRACE
(
"Calling glOrtho with %f, %f, %f, %f
\n
"
,
width
,
height
,
-
minZ
,
-
maxZ
);
glOrtho
(
X
,
X
+
width
,
Y
+
height
,
Y
,
-
minZ
,
-
maxZ
);
checkGLcall
(
"glOrtho"
);
/* Window Coord 0 is the middle of the first pixel, so translate by half
a pixel (See comment above glTranslate below) */
glTranslatef
(
0
.
5
,
0
.
5
,
0
);
checkGLcall
(
"glTranslatef(0.5, 0.5, 0)"
);
}
if
(
This
==
This
->
Device
->
backBuffer
)
{
glDrawBuffer
(
GL_BACK
);
}
else
if
(
This
==
This
->
Device
->
frontBuffer
)
{
...
...
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