DirectX under Wine

Robert Fairlie rfairlie at kylebank.com
Thu Apr 26 05:28:41 CDT 2007


Hello,

I am a contractor for a company in the UK. I have developed a 3D module for an oil reservoir visualisation program on Windows that is now required to run on Linux. The Wine port has been very successful (it started a month or so ago), but I'm having a couple of DirectX-related problems. We're using DirectX 9, the LinuxOS is Fedora Core 6, the Wine version is 0.9.32, and we're only using the binary loader, i.e. we're simply running our Windows executable under Wine. 

The problems I'm having relate to calling IDirect3DSurface9::GetDC() on an offscreen surface, which doesn't appear to work, and to calling IDirect3DDevice9::CreateStateBlock() with D3DSBBT_ALL, which appears to hang the program. I've had a look in the bug lists, but I didn't see anything relating to these issues. I'd greatly appreciate any information anyone has on these two issues. I'd also appreciate any information on how the DirectX to OpenGL translation is implemented. For example, does Wine use hardware-accelerated OpenGL?

Our program was initially affected by Wine bug 2398, i.e. the bug that causes the OpenGL window to occupy the whole application window. We got round this by first rendering to an offscreen surface, copying the offscreen surface to a bitmap, and then blitting the bitmap to the window. It is of course slower but its acceptable for us and gives us nice MDI behaviour under Wine. However, since we mix DirectX and GDI, we would like to use GetDC() on the offscreen surface. This isn't crucial, but among other things it would allow us to blit the offscreen surface into the bitmap, rather than using IDirect3DSurface9::LockRect() and copying it pixel by pixel as we're doing at the moment.


Thanks,

Robert Fairlie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20070426/99f69cce/attachment.htm


More information about the wine-devel mailing list