Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to develop DirectX apps in Linux?

More out of interest than anything else, but can you compile a DirectX app under linux?

Obviously there's no official SDK, but I was thinking it might be possible with wine.

Presumably wine has an implementation of the DirectX interface in order to run games? Is it possible to link against that? (edit: This is called winelib)

Failing that, maybe a mingw cross compiler with the app running under wine.

Half answered my own question here, but wondered if anyone had heard of anything like this being done?

like image 599
Nick Avatar asked Sep 07 '08 00:09

Nick


1 Answers

I've had some luck with this. I've managed to compile this simple Direct3D example.

I used winelib for this (wine-dev package on Ubuntu). Thanks to alastair for pointing me to winelib.

I modified the source slightly to convert the wchars to chars (1 on line 52, 2 on line 55, by removing the L before the string literals). There may be a way around this, but this got it up and running.

I then compiled the source with the following:

wineg++ -ld3d9 -ld3dx9 triangle.cpp

This generates an a.out.exe.so binary, as well as an a.out script to run it under wine.

like image 170
Nick Avatar answered Sep 20 '22 22:09

Nick