Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
0e0ff518
Commit
0e0ff518
authored
19 years ago
by
Oliver Stieber
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update the implementation of GetFrontBufferData in stateblock.
parent
c6e294de
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/wined3d/swapchain.c
+22
-14
22 additions, 14 deletions
dlls/wined3d/swapchain.c
with
22 additions
and
14 deletions
dlls/wined3d/swapchain.c
+
22
−
14
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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment