PATCH: Enable creation of devices and textures from a surface
Christian Costa
titan.costa at wanadoo.fr
Wed Sep 25 16:51:53 CDT 2002
Changelog :
dlls/ddraw/dsurface/main.c
Enable creation of our OpenGL Direct3D device from a surface used as
rendering target.
Enable creation of a texture from a surface.
Christian Costa titan.costa at wanadoo.fr
-------------- next part --------------
Index: main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/dsurface/main.c,v
retrieving revision 1.27
diff -u -r1.27 main.c
--- main.c 16 Jul 2002 01:16:14 -0000 1.27
+++ main.c 25 Sep 2002 19:19:02 -0000
@@ -24,6 +24,7 @@
#include <assert.h>
#include <string.h>
+#include "mesa_private.h"
#include "wine/debug.h"
#include "ddraw_private.h"
#include "dsurface/main.h"
@@ -158,6 +159,24 @@
*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;
}
More information about the wine-patches
mailing list