D3DX8 - to accelerate or not

Started by
0 comments, last by TheToad 21 years, 5 months ago
Howdy all, I have been steadily plodding along learning D3DX8 and have run into a situation. I have a PC at home and one at work. The one I use at home has a very nice new vid card. The one at work is old and stock vid card. When running my games at home I can create the device with D3DDEVTYPE_HAL and it works fine: r = pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWndTarget,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp, ppDevice ); when I try to run it at work it creates a fun memory exception and wont run so that I have to change it to D3DDEVTYPE_REF to get it to work: r = pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, hWndTarget,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp, ppDevice ); IS THERE A CHECK I CAN MAKE BEFORE CREATING THE DEVICE THAT WILL LET ME KNOW IF WHICH ONE THE COMPUTER IM RUNNING ON CAN HANDLE? IF THERE IS A CHECK CAN ANY OF YOU POINT ME IN THE RIGHT DIRECTION? thanks in advance - Toad -
- Toad -
Advertisement
1.
a) IDirect3D8::GetAdapterCount to find out how many graphics devices are usable in the system.

b) IDirect3D8::CheckDeviceType to see if a particular adapter can work in the screen mode you desire.

c) IDirect3D8::GetDeviceCaps to find out exactly what a particular adapter is capable of.


2. If the HAL device can''t be created, then the CreateDevice call will fail *without* giving you an exception. Instead it will return a failure error code.


3. Take a look at the sample framework for the DirectX SDK, that checks to see whether a device can manage what you want before creating it.


4. There is no guarantee that a computer will have the REF device. It''s intended purely for development testing purposes. On machines without the SDK it''s unlikely to be present.


5. Wrong forum. There is a "DirectX forum" you probably missed just above this one.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement