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
5fddfd5b
Commit
5fddfd5b
authored
Apr 16, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Apr 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use surface_get_gl_buffer where appropriate.
parent
1b9a5ba6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
36 deletions
+16
-36
surface.c
dlls/wined3d/surface.c
+16
-36
No files found.
dlls/wined3d/surface.c
View file @
5fddfd5b
...
...
@@ -809,19 +809,11 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED
glReadBuffer
(
myDevice
->
offscreenBuffer
);
srcIsUpsideDown
=
TRUE
;
}
else
{
if
(
iface
==
swapchain
->
frontBuffer
)
{
TRACE
(
"Locking the front buffer
\n
"
);
glReadBuffer
(
GL_FRONT
);
}
else
if
(
swapchain
->
backBuffer
&&
iface
==
swapchain
->
backBuffer
[
0
])
{
TRACE
(
"Locking the back buffer
\n
"
);
glReadBuffer
(
GL_BACK
);
}
else
{
/* Ok, there is an issue: OpenGL does not guarant any back buffer number, so all we can do is to read GL_BACK
* and hope it gives what the app wants
*/
FIXME
(
"Application is locking a 2nd or higher back buffer
\n
"
);
glReadBuffer
(
GL_BACK
);
}
GLenum
buffer
=
surface_get_gl_buffer
(
iface
,
(
IWineD3DSwapChain
*
)
swapchain
);
TRACE
(
"Locking %#x buffer
\n
"
,
buffer
);
glReadBuffer
(
buffer
);
checkGLcall
(
"glReadBuffer"
);
IWineD3DSwapChain_Release
((
IWineD3DSwapChain
*
)
swapchain
);
srcIsUpsideDown
=
FALSE
;
}
...
...
@@ -1207,19 +1199,11 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
glDrawBuffer
(
myDevice
->
offscreenBuffer
);
checkGLcall
(
"glDrawBuffer(myDevice->offscreenBuffer)"
);
}
else
{
if
(
iface
==
swapchain
->
frontBuffer
)
{
TRACE
(
"Onscreen front buffer
\n
"
);
glDrawBuffer
(
GL_FRONT
);
checkGLcall
(
"glDrawBuffer(GL_FRONT)"
);
}
else
if
(
iface
==
swapchain
->
backBuffer
[
0
])
{
TRACE
(
"Onscreen back buffer
\n
"
);
glDrawBuffer
(
GL_BACK
);
checkGLcall
(
"glDrawBuffer(GL_BACK)"
);
}
else
{
FIXME
(
"Unlocking a higher back buffer
\n
"
);
glDrawBuffer
(
GL_BACK
);
checkGLcall
(
"glDrawBuffer(GL_BACK)"
);
}
GLenum
buffer
=
surface_get_gl_buffer
(
iface
,
(
IWineD3DSwapChain
*
)
swapchain
);
TRACE
(
"Unlocking %#x buffer
\n
"
,
buffer
);
glDrawBuffer
(
buffer
);
checkGLcall
(
"glDrawBuffer"
);
IWineD3DSwapChain_Release
((
IWineD3DSwapChain
*
)
swapchain
);
}
...
...
@@ -2364,10 +2348,9 @@ static inline void fb_copy_to_texture_direct(IWineD3DSurfaceImpl *This, IWineD3D
checkGLcall
(
"glBindTexture"
);
if
(
!
swapchain
)
{
glReadBuffer
(
myDevice
->
offscreenBuffer
);
}
else
if
(
swapchain
->
backBuffer
&&
SrcSurface
==
swapchain
->
backBuffer
[
0
])
{
glReadBuffer
(
GL_BACK
);
}
else
{
glReadBuffer
(
GL_FRONT
);
GLenum
buffer
=
surface_get_gl_buffer
(
SrcSurface
,
(
IWineD3DSwapChain
*
)
swapchain
);
glReadBuffer
(
buffer
);
}
checkGLcall
(
"glReadBuffer"
);
...
...
@@ -2877,14 +2860,11 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
if
(
!
dstSwapchain
)
{
TRACE
(
"Drawing to offscreen buffer
\n
"
);
glDrawBuffer
(
myDevice
->
offscreenBuffer
);
}
else
if
(
This
==
(
IWineD3DSurfaceImpl
*
)
dstSwapchain
->
frontBuffer
)
{
TRACE
(
"Drawing to front buffer
\n
"
);
glDrawBuffer
(
GL_FRONT
);
checkGLcall
(
"glDrawBuffer GL_FRONT"
);
}
else
{
TRACE
(
"Drawing to back buffer
\n
"
);
glDrawBuffer
(
GL_BACK
);
checkGLcall
(
"glDrawBuffer GL_BACK"
);
GLenum
buffer
=
surface_get_gl_buffer
((
IWineD3DSurface
*
)
This
,
(
IWineD3DSwapChain
*
)
dstSwapchain
);
TRACE
(
"Drawing to %#x buffer
\n
"
,
buffer
);
glDrawBuffer
(
buffer
);
checkGLcall
(
"glDrawBuffer"
);
}
/* Bind the texture */
...
...
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