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
40f3f0b0
Commit
40f3f0b0
authored
Mar 30, 2010
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Mar 31, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use RECT instead of WINED3DRECT in fb_copy_to_texture_hwstretch.
parent
7f1f61e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
surface.c
dlls/wined3d/surface.c
+14
-14
No files found.
dlls/wined3d/surface.c
View file @
40f3f0b0
...
...
@@ -3504,7 +3504,7 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D
/* Uses the hardware to stretch and flip the image */
static
inline
void
fb_copy_to_texture_hwstretch
(
IWineD3DSurfaceImpl
*
This
,
IWineD3DSurface
*
SrcSurface
,
IWineD3DSwapChainImpl
*
swapchain
,
const
WINED3DRECT
*
srect
,
const
WINED3DRECT
*
d
rect
,
IWineD3DSwapChainImpl
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_
rect
,
BOOL
upsidedown
,
WINED3DTEXTUREFILTERTYPE
Filter
)
{
IWineD3DDeviceImpl
*
myDevice
=
This
->
resource
.
device
;
...
...
@@ -3606,7 +3606,7 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
glBindTexture
(
GL_TEXTURE_2D
,
src
);
checkGLcall
(
"glBindTexture(GL_TEXTURE_2D, src)"
);
/* TODO: Only copy the part that will be read. Use sr
ect->x1, srect->y2
as origin, but with the width watch
/* TODO: Only copy the part that will be read. Use sr
c_rect->left, src_rect->bottom
as origin, but with the width watch
* out for power of 2 sizes
*/
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_RGBA
,
Src
->
pow2Width
,
Src
->
pow2Height
,
0
,
...
...
@@ -3634,15 +3634,15 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
}
checkGLcall
(
"glEnd and previous"
);
left
=
sr
ect
->
x1
;
right
=
sr
ect
->
x2
;
left
=
sr
c_rect
->
left
;
right
=
sr
c_rect
->
right
;
if
(
upsidedown
)
{
top
=
Src
->
currentDesc
.
Height
-
sr
ect
->
y1
;
bottom
=
Src
->
currentDesc
.
Height
-
sr
ect
->
y2
;
top
=
Src
->
currentDesc
.
Height
-
sr
c_rect
->
top
;
bottom
=
Src
->
currentDesc
.
Height
-
sr
c_rect
->
bottom
;
}
else
{
top
=
Src
->
currentDesc
.
Height
-
sr
ect
->
y2
;
bottom
=
Src
->
currentDesc
.
Height
-
sr
ect
->
y1
;
top
=
Src
->
currentDesc
.
Height
-
sr
c_rect
->
bottom
;
bottom
=
Src
->
currentDesc
.
Height
-
sr
c_rect
->
top
;
}
if
(
Src
->
Flags
&
SFLAG_NORMCOORD
)
{
...
...
@@ -3666,15 +3666,15 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
/* top left */
glTexCoord2f
(
left
,
top
);
glVertex2i
(
0
,
fbheight
-
d
rect
->
y2
-
drect
->
y1
);
glVertex2i
(
0
,
fbheight
-
d
st_rect
->
bottom
-
dst_rect
->
top
);
/* top right */
glTexCoord2f
(
right
,
top
);
glVertex2i
(
d
rect
->
x2
-
drect
->
x1
,
fbheight
-
drect
->
y2
-
drect
->
y1
);
glVertex2i
(
d
st_rect
->
right
-
dst_rect
->
left
,
fbheight
-
dst_rect
->
bottom
-
dst_rect
->
top
);
/* bottom right */
glTexCoord2f
(
right
,
bottom
);
glVertex2i
(
d
rect
->
x2
-
drect
->
x1
,
fbheight
);
glVertex2i
(
d
st_rect
->
right
-
dst_rect
->
left
,
fbheight
);
glEnd
();
checkGLcall
(
"glEnd and previous"
);
...
...
@@ -3690,9 +3690,9 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
checkGLcall
(
"glBindTexture"
);
glCopyTexSubImage2D
(
texture_target
,
0
,
d
rect
->
x1
,
drect
->
y1
,
/* xoffset, yoffset */
d
st_rect
->
left
,
dst_rect
->
top
,
/* xoffset, yoffset */
0
,
0
,
/* We blitted the image to the origin */
d
rect
->
x2
-
drect
->
x1
,
drect
->
y2
-
drect
->
y1
);
d
st_rect
->
right
-
dst_rect
->
left
,
dst_rect
->
bottom
-
dst_rect
->
top
);
checkGLcall
(
"glCopyTexSubImage2D"
);
if
(
drawBuffer
==
GL_BACK
)
{
...
...
@@ -3997,7 +3997,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
fb_copy_to_texture_direct
(
This
,
SrcSurface
,
&
src_rect
,
&
dst_rect
,
upsideDown
,
Filter
);
}
else
{
TRACE
(
"Using hardware stretching to flip / stretch the texture
\n
"
);
fb_copy_to_texture_hwstretch
(
This
,
SrcSurface
,
srcSwapchain
,
(
WINED3DRECT
*
)
&
src_rect
,
(
WINED3DRECT
*
)
&
dst_rect
,
upsideDown
,
Filter
);
fb_copy_to_texture_hwstretch
(
This
,
SrcSurface
,
srcSwapchain
,
&
src_rect
,
&
dst_rect
,
upsideDown
,
Filter
);
}
/* Clear the palette as the surface didn't have a palette attached, it would confuse GetPalette and other calls */
...
...
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