From 74d0d4c5626bbbde2f30202539c9119b6a6e2716 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Thu, 26 Sep 2002 03:20:07 +0000 Subject: [PATCH] Enable creation of our OpenGL Direct3D device from a surface used as rendering target. Enable creation of a texture from a surface. --- dlls/ddraw/dsurface/main.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dlls/ddraw/dsurface/main.c b/dlls/ddraw/dsurface/main.c index 3a73a0edfae..909f7a76795 100644 --- a/dlls/ddraw/dsurface/main.c +++ b/dlls/ddraw/dsurface/main.c @@ -24,6 +24,7 @@ #include #include +#include "mesa_private.h" #include "wine/debug.h" #include "ddraw_private.h" #include "dsurface/main.h" @@ -158,6 +159,24 @@ Main_DirectDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7 iface, REFIID riid, *ppObj = ICOM_INTERFACE(This, IDirectDrawGammaControl); return S_OK; } +#ifdef HAVE_OPENGL + else if ( IsEqualGUID( &IID_D3DDEVICE_OpenGL, riid ) ) + { + This->ref++; + return is_OpenGL_dx3(riid, This, (IDirect3DDeviceImpl**)ppObj)?S_OK:E_NOINTERFACE; + } + else if (IsEqualGUID( &IID_IDirect3DTexture, riid ) ) + { + LPDIRECT3DTEXTURE iface; + This->ref++; + iface = d3dtexture_create(This); + if (iface) { + *ppObj = (LPVOID)iface; + return S_OK; + } else + return E_NOINTERFACE; + } +#endif else return E_NOINTERFACE; } -- 2.11.4.GIT