/*
*IDirect3DSwapChain9 implementation
*
*Copyright 2002-2003 Jason Edmeades
*Copyright 2002-2003 Raphael Junqueira
*Copyright 2005 Oliver Stieber
*Copyright 2007-2008 Stefan Dösinger for CodeWeavers
*
*modify it under the terms of the GNU Lesser General Public
*License as published by the Free Software Foundation; either
*version 2.1 of the License, or (at your option) any later version.
*
*This library is distributed in the hope that it will be useful,
*but WITHOUT ANY WARRANTY; without even the implied warranty of
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*Lesser General Public License for more details.
*
*You should have received a copy of the GNU Lesser General Public
*License along with this library; if not, write to the Free Software
*Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#include "config.h"
#include "wined3d_private.h"
/* IDirect3DSwapChain IUnknown parts follow: */
HRESULT WINAPI IWineD3DBaseSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, REFIID riid, void **object)
{
{
return S_OK;
}
return E_NOINTERFACE;
}
return refCount;
}
if (refCount == 0) {
}
return refCount;
}
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface, IWineD3DSurface *pDestSurface) {
start.x = 0;
start.y = 0;
#ifndef VBOX_WITH_WDDM
}
#endif
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UINT iBackBuffer, WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) {
#ifdef VBOX_WITH_WDDM
if (iBackBuffer == ~0UL)
{
return WINED3D_OK;
}
#endif
TRACE("Back buffer count out of range\n");
/* Native d3d9 doesn't set NULL here, just as wine's d3d9. But set it
* here in wined3d to avoid problems in other libs
*/
*ppBackBuffer = NULL;
return WINED3DERR_INVALIDCALL;
}
/* Return invalid if there is no backbuffer array, otherwise it will crash when ddraw is
* used (there This->backBuffer is always NULL). We need this because this function has
* to be called from IWineD3DStateBlockImpl_InitStartupStateBlock to get the default
* scissorrect dimensions. */
if( !This->backBuffer ) {
*ppBackBuffer = NULL;
return WINED3DERR_INVALIDCALL;
}
/* Note inc ref on returned surface */
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *iface, WINED3DRASTER_STATUS *pRasterStatus) {
pRasterStatus->ScanLine = 0;
/* No openGL equivalent */
if (!warned)
{
}
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, WINED3DDISPLAYMODE*pMode) {
TRACE("(%p) : returning w(%d) h(%d) rr(%d) fmt(%u,%s)\n", This, pMode->Width, pMode->Height, pMode->RefreshRate,
return hr;
}
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3DDevice**ppDevice) {
/* Note Calling this method will increase the internal reference count
on the IDirect3DDevice9 interface. */
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, WINED3DPRESENT_PARAMETERS *pPresentationParameters) {
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, DWORD Flags, CONST WINED3DGAMMARAMP *pRamp){
#ifndef VBOX_WITH_WDDM
#else
#endif
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface, WINED3DGAMMARAMP *pRamp){
#ifndef VBOX_WITH_WDDM
#else
#endif
return WINED3D_OK;
}