CreateDevice not working for me. I need some enlightened information.

Started by
5 comments, last by TheToad 22 years, 3 months ago
Can anyone fill me in on what effects hardware can have on the call to ''CreateDevice''. I am at my whits end trying to get just a basic red pixel to display. I have even tried to run the example that comes with DirectX 8.0 SDK package in \mssdk\samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice. The tutorial doesn''t work for me either. I''m to the point where I think it must be hardware related. Can anyone out there shed any light on where I should look. thanks in advance, DMB
- Toad -
Advertisement
What kind of video card do you have?
You need to have a driver installed that supports Dx6 or later to use Dx8, IIRC.

Many of the examples require 3D accel cards.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
If you can create a Direct3D8 object, call GetDeviceCaps and/or GetAdapterDisplayMode to retrieve information on the specified adapter and its current configuration. Note that, and then try creating a device with that info.

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
quote:Original post by TheToad
Can anyone fill me in on what effects hardware can have on the call to ''CreateDevice''. I am at my whits end trying to get just a basic red pixel to display. I have even tried to run the example that comes with DirectX 8.0 SDK package in \mssdk\samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice. The tutorial doesn''t work for me either. I''m to the point where I think it must be hardware related. Can anyone out there shed any light on where I should look.

thanks in advance,
DMB


How old is your video hw? Some of the ancient boards out there do not support d3d8 in hw (I had that same problem recently with a virge/gx2 chipset). You may have to stick with sw only rendering (use the D3DDEVTYPE_REF flag). Run dxcapsviewer app and see if the parameters you passed to CreateDevice are compatible w/ the caps given.
If your initialisation code looks something like this, and it doesn''t work, you have a problem

  // Create the D3D Object  if( NULL == ( m_pD3D = Direct3DCreate8( D3D_SDK_VERSION ) ) )  {    throw CHException( _T( "Failed to create D3D Object" ) );  }  // Retrieve the primary adapter''s current settings    D3DDISPLAYMODE d3ddm;  m_pD3D->GetAdapterDisplayMode( D3DADAPTER_DEFAULT, &d3ddm );    D3DPRESENT_PARAMETERS d3dpp;  ZeroMemory( &d3dpp, sizeof(d3dpp) );    d3dpp.Windowed          = TRUE;  d3dpp.SwapEffect        = D3DSWAPEFFECT_COPY;  d3dpp.BackBufferFormat  = d3ddm.Format;      // Attempt to create a device using the current settings  HRESULT hr = m_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, m_hWnd,                                     D3DCREATE_SOFTWARE_VERTEXPROCESSING,                                     &d3dpp, &m_pD3DDevice );  if( FAILED( hr ) )  {    CHException e;    e.ParseD3DError( hr );    throw e;  }  


People might not remember what you said, or what you did, but they will always remember how you made them feel.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
You might try changing the device type to reference or hardware emulation... if after that it still doesn''t work, it''s probably a hardware/driver problem.


People might not remember what you said, or what you did, but they will always remember how you made them feel.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
Thanks everyone for the responses. I am running a Voodoo3 3000 with Win2k and DirectX 8.0. I am currently looking to download the latest drivers out there. Hopefully they will help. Has anyone else run across this issue with the hardware/software set I explained above. I would be very interested in a solution that doesn''t require a new computer.

Thanks again everyone!!!!
TheToad
- Toad -

This topic is closed to new replies.

Advertisement