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
daa6a3d7
Commit
daa6a3d7
authored
May 13, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Support for single buffering.
parent
2f724834
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
24 deletions
+42
-24
device.c
dlls/wined3d/device.c
+27
-14
swapchain.c
dlls/wined3d/swapchain.c
+15
-10
No files found.
dlls/wined3d/device.c
View file @
daa6a3d7
...
@@ -1152,9 +1152,6 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac
...
@@ -1152,9 +1152,6 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac
D3DCREATEOBJECTINSTANCE
(
object
,
SwapChain
)
D3DCREATEOBJECTINSTANCE
(
object
,
SwapChain
)
/* Initialize other useful values */
object
->
presentParms
.
BackBufferCount
=
1
;
/* TODO:? support for gl_aux buffers */
/*********************
/*********************
* Lookup the window Handle and the relating X window handle
* Lookup the window Handle and the relating X window handle
********************/
********************/
...
@@ -1382,18 +1379,34 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac
...
@@ -1382,18 +1379,34 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac
NULL
/* pShared (always null)*/
);
NULL
/* pShared (always null)*/
);
if
(
object
->
frontBuffer
!=
NULL
)
if
(
object
->
frontBuffer
!=
NULL
)
IWineD3DSurface_SetContainer
(
object
->
frontBuffer
,
(
IWineD3DBase
*
)
object
);
IWineD3DSurface_SetContainer
(
object
->
frontBuffer
,
(
IWineD3DBase
*
)
object
);
TRACE
(
"calling rendertarget CB
\n
"
);
if
(
object
->
presentParms
.
BackBufferCount
>
0
)
{
hr
=
D3DCB_CreateRenderTarget
((
IUnknown
*
)
This
->
parent
,
TRACE
(
"calling rendertarget CB
\n
"
);
object
->
presentParms
.
BackBufferWidth
,
hr
=
D3DCB_CreateRenderTarget
((
IUnknown
*
)
This
->
parent
,
object
->
presentParms
.
BackBufferHeight
,
object
->
presentParms
.
BackBufferWidth
,
object
->
presentParms
.
BackBufferFormat
,
object
->
presentParms
.
BackBufferHeight
,
object
->
presentParms
.
MultiSampleType
,
object
->
presentParms
.
BackBufferFormat
,
object
->
presentParms
.
MultiSampleQuality
,
object
->
presentParms
.
MultiSampleType
,
TRUE
/* Lockable */
,
object
->
presentParms
.
MultiSampleQuality
,
&
object
->
backBuffer
,
TRUE
/* Lockable */
,
NULL
/* pShared (always null)*/
);
&
object
->
backBuffer
,
if
(
object
->
backBuffer
!=
NULL
)
NULL
/* pShared (always null)*/
);
}
else
{
object
->
backBuffer
=
NULL
;
}
if
(
object
->
backBuffer
!=
NULL
)
{
IWineD3DSurface_SetContainer
(
object
->
backBuffer
,
(
IWineD3DBase
*
)
object
);
IWineD3DSurface_SetContainer
(
object
->
backBuffer
,
(
IWineD3DBase
*
)
object
);
ENTER_GL
();
glDrawBuffer
(
GL_BACK
);
checkGLcall
(
"glDrawBuffer(GL_BACK)"
);
LEAVE_GL
();
}
else
{
/* Single buffering - draw to front buffer */
ENTER_GL
();
glDrawBuffer
(
GL_FRONT
);
checkGLcall
(
"glDrawBuffer(GL_FRONT)"
);
LEAVE_GL
();
}
/* Under directX swapchains share the depth stencil, so only create one depth-stencil */
/* Under directX swapchains share the depth stencil, so only create one depth-stencil */
if
(
pPresentationParameters
->
EnableAutoDepthStencil
)
{
if
(
pPresentationParameters
->
EnableAutoDepthStencil
)
{
...
...
dlls/wined3d/swapchain.c
View file @
daa6a3d7
...
@@ -94,19 +94,24 @@ ULONG WINAPI IWineD3DSwapChainImpl_Release(IWineD3DSwapChain *iface) {
...
@@ -94,19 +94,24 @@ ULONG WINAPI IWineD3DSwapChainImpl_Release(IWineD3DSwapChain *iface) {
IWineD3DDevice_SwapChainReleased
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
,
iface
);
IWineD3DDevice_SwapChainReleased
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
,
iface
);
/* release the ref to the front and back buffer parents */
/* release the ref to the front and back buffer parents */
IWineD3DSurface_SetContainer
(
This
->
frontBuffer
,
0
);
if
(
This
->
frontBuffer
)
{
IWineD3DSurface_GetParent
(
This
->
frontBuffer
,
&
bufferParent
);
IWineD3DSurface_SetContainer
(
This
->
frontBuffer
,
0
);
IUnknown_Release
(
bufferParent
);
/* once for the get parent */
IWineD3DSurface_GetParent
(
This
->
frontBuffer
,
&
bufferParent
);
if
(
IUnknown_Release
(
bufferParent
)
>
0
){
IUnknown_Release
(
bufferParent
);
/* once for the get parent */
FIXME
(
"(%p) Something's still holding the front buffer
\n
"
,
This
);
if
(
IUnknown_Release
(
bufferParent
)
>
0
){
FIXME
(
"(%p) Something's still holding the front buffer
\n
"
,
This
);
}
}
}
IWineD3DSurface_SetContainer
(
This
->
backBuffer
,
0
);
if
(
This
->
backBuffer
)
{
IWineD3DSurface_GetParent
(
This
->
backBuffer
,
&
bufferParent
);
IWineD3DSurface_SetContainer
(
This
->
backBuffer
,
0
);
IUnknown_Release
(
bufferParent
);
/* once for the get parent */
IWineD3DSurface_GetParent
(
This
->
backBuffer
,
&
bufferParent
);
if
(
IUnknown_Release
(
bufferParent
)
>
0
){
IUnknown_Release
(
bufferParent
);
/* once for the get parent */
FIXME
(
"(%p) Something's still holding the back buffer
\n
"
,
This
);
if
(
IUnknown_Release
(
bufferParent
)
>
0
){
FIXME
(
"(%p) Something's still holding the back buffer
\n
"
,
This
);
}
}
}
/* Clean up the context */
/* Clean up the context */
/* check that we are the current context first */
/* check that we are the current context first */
if
(
glXGetCurrentContext
()
==
This
->
glCtx
){
if
(
glXGetCurrentContext
()
==
This
->
glCtx
){
...
...
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