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
0e0ff518
Commit
0e0ff518
authored
Aug 23, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Aug 23, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the implementation of GetFrontBufferData in stateblock.
parent
c6e294de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
swapchain.c
dlls/wined3d/swapchain.c
+22
-14
No files found.
dlls/wined3d/swapchain.c
View file @
0e0ff518
...
...
@@ -324,24 +324,32 @@ HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST REC
HRESULT
WINAPI
IWineD3DSwapChainImpl_GetFrontBufferData
(
IWineD3DSwapChain
*
iface
,
IWineD3DSurface
*
pDestSurface
)
{
IWineD3DSwapChainImpl
*
This
=
(
IWineD3DSwapChainImpl
*
)
iface
;
IWineD3DSurfaceImpl
*
surface
=
(
IWineD3DSurfaceImpl
*
)
pDestSurface
;
GLenum
format
;
GLenum
type
;
WINED3DFORMAT
d3dformat
;
int
width
;
int
height
;
WINED3DSURFACE_DESC
desc
;
glDescriptor
*
glDescription
;
TRACE
(
"(%p) : iface(%p) pDestSurface(%p)
\n
"
,
This
,
iface
,
pDestSurface
);
ENTER_GL
();
/* check to see if it's the backbuffer or the frontbuffer being requested (to make sure the data is up to date) */
format
=
D3DFmt2GLFmt
(
This
->
wineD3DDevice
,
surface
->
resource
.
format
);
type
=
D3DFmt2GLType
(
This
->
wineD3DDevice
,
surface
->
resource
.
format
);
desc
.
Width
=
&
width
;
desc
.
Height
=
&
height
;
desc
.
Format
=
&
d3dformat
;
#if 0 /* TODO: make sure that this swapchains context is active */
IWineD3DDevice_ActivateSwapChainContext(This->wineD3DDevice, iface);
#endif
IWineD3DSurface_GetDesc
(
pDestSurface
,
&
desc
);
/* make sure that the front buffer is the active read buffer */
glReadBuffer
(
GL_FRONT
);
glReadPixels
(
0
,
0
,
surface
->
currentDesc
.
Width
,
surface
->
currentDesc
.
Height
,
format
,
type
,
surface
->
resource
.
allocatedMemory
);
/* Read the pixels from the buffer into the surfaces memory */
IWineD3DSurface_GetGlDesc
(
pDestSurface
,
&
glDescription
);
glReadPixels
(
glDescription
->
target
,
glDescription
->
level
,
width
,
height
,
glDescription
->
glFormat
,
glDescription
->
glType
,
(
void
*
)
IWineD3DSurface_GetData
(
pDestSurface
));
LEAVE_GL
();
return
D3D_OK
;
}
...
...
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