I figured I would give DirectX programming a try since I've been finding myself frustrated with the old school ways of OpenGL. I downloaded the October SDK and installed it, I am using Visual Studio 2003 Professional on a Windows XP Professional operating system. This is running inside a VMWare machine.
I can run the example executables just fine, albeit in software mode, but it does work. Now for some reason when I load the tutorial 01 solution (createdevice) and attempt to run it I get the message 'Could not initialize Direct3D...'. I changed the exception handler in InitializeGraphics() function to output the message exception and it just gives me 'Error in the application'.
I have no idea what's going on here, the correct versions are set for the DirectX and Direct3D references.
Does anybody have any idea what might be going on here Any help would be greatly appreciated.
Thanks,

Tutorials build but will not run
stratis
It shouldn't be too complicated. A few things to check though:
1. The target machine will need the appropriate runtime/driver installed
2. If you're using D3DX then you may need to distribute the developer runtime (although, I'm not sure this is applicable to MDX programming! )
3. Make sure you're enumerating all features you rely on.
That last point is a good place to slip-up when you've been developing with the REFRAST - because it supports pretty much everything, it's unlikely your application would ever have failed due to a non-existant hardware feature. However, when running on real hardware this can be quite common
Jack
Sohail Iqbal
http://www.vmware.com/support/ws5/doc/ws_vidsound_d3d_limitations.html
Its *very* limited - only DX8 and DX8 feature in DX9.
Yu Wang
The only reason I'm using VMWare is because it's the only way I was allowed to install the DirectX SDK on my PC at work since it's not a standard part of the software install (yet). Not sure if this is a separate issue or not, but my plan was to just copy the built exe from the virtual machine to my physical machine when it's too complicated to run virtually, is there anything I need to know when moving a DirectX app in this way I know I would change the DeviceType back to hardware, but is there anything else
Thanks again,
Skorpion
If so, A lot of those tend to disable hardware acceleration - meaning that hardware acceleration Direct3D is most likely disabled. Thus you get your problem
Any chance of running it outside of VMWare
hth
Jack
Bruce Fullwood
I used to http://www.thezbuffer.com/articles/241.aspx.
I was in the video by special invitation from the coding4fun guys.
lily rose
device =
new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams); //Create a device(This is the managed tutorial - but C++ will have similar code).
Change the DeviceType.Hardware to DeviceType.Ref to use the reference (in software) rasterizer. It will be slow!
The samples (as opposed to tutorials) check for hardware first and automatically switch to ref if its not there.
You won't get far inside VMWare or VPC - I would assume OpenGL has the same speed problem though.
Omar Qadan
Suffice to say that any graphics API's performance is highly dependent on access to the graphics hardware resources. VMWare/Virtual PC are highly inappropriate environments for graphics programming.
H3