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
7414ebc9
Commit
7414ebc9
authored
Oct 29, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't flip the coordinate system in set_blit_dimension().
parent
1e301027
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
31 deletions
+24
-31
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+4
-3
context.c
dlls/wined3d/context.c
+1
-1
surface.c
dlls/wined3d/surface.c
+19
-27
No files found.
dlls/wined3d/arb_program_shader.c
View file @
7414ebc9
...
...
@@ -7168,10 +7168,11 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_
* whereas the real gl drawable size is the size of the window. */
dst_swapchain
=
dst_surface
->
container
.
type
==
WINED3D_CONTAINER_SWAPCHAIN
?
dst_surface
->
container
.
u
.
swapchain
:
NULL
;
if
(
dst_swapchain
&&
dst_surface
==
dst_swapchain
->
front_buffer
)
surface_translate_frontbuffer_coords
(
dst_surface
,
context
->
win_handle
,
&
dst_rect
);
else
if
(
surface_is_offscreen
(
dst_surface
))
if
(
!
surface_is_offscreen
(
dst_surface
))
{
if
(
dst_swapchain
&&
dst_surface
==
dst_swapchain
->
front_buffer
)
surface_translate_frontbuffer_coords
(
dst_surface
,
context
->
win_handle
,
&
dst_rect
);
dst_rect
.
top
=
dst_surface
->
currentDesc
.
Height
-
dst_rect
.
top
;
dst_rect
.
bottom
=
dst_surface
->
currentDesc
.
Height
-
dst_rect
.
bottom
;
}
...
...
dlls/wined3d/context.c
View file @
7414ebc9
...
...
@@ -1622,7 +1622,7 @@ static inline void set_blit_dimension(UINT width, UINT height) {
checkGLcall
(
"glMatrixMode(GL_PROJECTION)"
);
glLoadIdentity
();
checkGLcall
(
"glLoadIdentity()"
);
glOrtho
(
0
,
width
,
height
,
0
,
0
.
0
,
-
1
.
0
);
glOrtho
(
0
,
width
,
0
,
height
,
0
.
0
,
-
1
.
0
);
checkGLcall
(
"glOrtho"
);
glViewport
(
0
,
0
,
width
,
height
);
checkGLcall
(
"glViewport"
);
...
...
dlls/wined3d/surface.c
View file @
7414ebc9
...
...
@@ -1767,8 +1767,6 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This, GLenum fm
checkGLcall
(
"glGetIntegerv"
);
glGetIntegerv
(
GL_CURRENT_RASTER_POSITION
,
&
prev_rasterpos
[
0
]);
checkGLcall
(
"glGetIntegerv"
);
glPixelZoom
(
1
.
0
f
,
-
1
.
0
f
);
checkGLcall
(
"glPixelZoom"
);
/* If not fullscreen, we need to skip a number of bytes to find the next row of data */
glGetIntegerv
(
GL_UNPACK_ROW_LENGTH
,
&
skipBytes
);
...
...
@@ -1817,9 +1815,6 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This, GLenum fm
checkGLcall
(
"glBindBufferARB"
);
}
glPixelZoom
(
1
.
0
f
,
1
.
0
f
);
checkGLcall
(
"glPixelZoom"
);
glRasterPos3iv
(
&
prev_rasterpos
[
0
]);
checkGLcall
(
"glRasterPos3iv"
);
...
...
@@ -3053,7 +3048,7 @@ static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWine
left
=
src_rect
->
left
;
right
=
src_rect
->
right
;
if
(
upsidedown
)
if
(
!
upsidedown
)
{
top
=
src_surface
->
currentDesc
.
Height
-
src_rect
->
top
;
bottom
=
src_surface
->
currentDesc
.
Height
-
src_rect
->
bottom
;
...
...
@@ -3082,19 +3077,19 @@ static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWine
glBegin
(
GL_QUADS
);
/* bottom left */
glTexCoord2f
(
left
,
bottom
);
glVertex2i
(
0
,
fbheight
);
glVertex2i
(
0
,
0
);
/* top left */
glTexCoord2f
(
left
,
top
);
glVertex2i
(
0
,
fbheight
-
dst_rect
.
bottom
-
dst_rect
.
top
);
glVertex2i
(
0
,
dst_rect
.
bottom
-
dst_rect
.
top
);
/* top right */
glTexCoord2f
(
right
,
top
);
glVertex2i
(
dst_rect
.
right
-
dst_rect
.
left
,
fbheight
-
dst_rect
.
bottom
-
dst_rect
.
top
);
glVertex2i
(
dst_rect
.
right
-
dst_rect
.
left
,
dst_rect
.
bottom
-
dst_rect
.
top
);
/* bottom right */
glTexCoord2f
(
right
,
bottom
);
glVertex2i
(
dst_rect
.
right
-
dst_rect
.
left
,
fbheight
);
glVertex2i
(
dst_rect
.
right
-
dst_rect
.
left
,
0
);
glEnd
();
checkGLcall
(
"glEnd and previous"
);
...
...
@@ -3140,21 +3135,21 @@ static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWine
glBegin
(
GL_QUADS
);
/* top left */
glTexCoord2f
(
0
.
0
f
,
(
float
)
fbheight
/
(
float
)
src_surface
->
pow2Height
);
glVertex2i
(
0
,
0
);
/* bottom left */
glTexCoord2f
(
0
.
0
f
,
0
.
0
f
);
glVertex2i
(
0
,
fbheight
);
/* bottom
righ
t */
glTexCoord2f
(
(
float
)
fbwidth
/
(
float
)
src_surface
->
pow2Width
,
0
.
0
f
);
glVertex2i
(
fbwidth
,
src_surface
->
currentDesc
.
Height
);
/* bottom
lef
t */
glTexCoord2f
(
0
.
0
f
,
(
float
)
fbheight
/
(
float
)
src_surface
->
pow2Height
);
glVertex2i
(
0
,
0
);
/*
top
right */
/*
bottom
right */
glTexCoord2f
((
float
)
fbwidth
/
(
float
)
src_surface
->
pow2Width
,
(
float
)
fbheight
/
(
float
)
src_surface
->
pow2Height
);
glVertex2i
(
fbwidth
,
0
);
/* top right */
glTexCoord2f
((
float
)
fbwidth
/
(
float
)
src_surface
->
pow2Width
,
0
.
0
f
);
glVertex2i
(
fbwidth
,
fbheight
);
glEnd
();
}
glDisable
(
texture_target
);
...
...
@@ -3368,16 +3363,13 @@ static void surface_blt_to_drawable(IWineD3DDeviceImpl *device,
context
=
context_acquire
(
device
,
dst_surface
);
context_apply_blit_state
(
context
,
device
);
/* context_apply_blit_state() sets up a flipped (in GL terms) projection
* matrix. As a result, we need to skip the flip for onscreen surfaces,
* and have to flip for offscreen surfaces instead, to undo the flip done
* by the projection matrix. */
if
(
swapchain
&&
dst_surface
==
swapchain
->
front_buffer
)
{
surface_translate_frontbuffer_coords
(
dst_surface
,
context
->
win_handle
,
&
dst_rect
);
}
else
if
(
surface_is_offscreen
(
dst_surface
))
if
(
!
surface_is_offscreen
(
dst_surface
))
{
if
(
swapchain
&&
dst_surface
==
swapchain
->
front_buffer
)
{
surface_translate_frontbuffer_coords
(
dst_surface
,
context
->
win_handle
,
&
dst_rect
);
}
dst_rect
.
top
=
dst_surface
->
currentDesc
.
Height
-
dst_rect
.
top
;
dst_rect
.
bottom
=
dst_surface
->
currentDesc
.
Height
-
dst_rect
.
bottom
;
}
...
...
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