Jump to content

  • Log In with Google      Sign In   
  • Create Account

What does error D3DERR_NOTAVAILABLE mean?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Argoran   Members   -  Reputation: 122

Like
0Likes
Like

Posted 04 June 2006 - 07:34 PM

I'm trying directx9. But it goes wrong when calling the CreateDevice function and returns an error called D3DERR_NOTAVAIBLE. The book just says 'The Device Do Not Support This Call'. I got really confused. Here is the codes:
D3DPRESENT_PARAMETERS D3DPresentParam;
ZeroMemory(&D3DPresentParam, sizeof(D3DPresentParam));
D3DPresentParam.Windowed = TRUE;
D3DPresentParam.SwapEffect = D3DSWAPEFFECT_DISCARD;
D3DPresentParam.BackBufferFormat = D3DFMT_UNKNOWN;
D3DPresentParam.BackBufferCount = 1;
D3DPresentParam.BackBufferHeight = 480;
D3DPresentParam.BackBufferWidth = 640;
D3DPresentParam.hDeviceWindow = hWnd;

HRESULT hResult;
if (D3D_OK!=(hResult = lpD3D->CreateDevice(D3DADAPTER_DEFAULT,
	                                   D3DDEVTYPE_REF,
					   hWnd,
					   D3DCREATE_SOFTWARE_VERTEXPROCESSING,
					   &D3DPresentParam,
					   &lpD3DDevice)))
{
      return false;
}



Sponsor:

#2 sakky   Banned   -  Reputation: 100

Like
0Likes
Like

Posted 04 June 2006 - 08:06 PM

Hehe, it means that the host hardware does not support the functionality you are requesting from Direct3D. In other words, you graphics card doesn’t support what ever your trying to do and Direct3D is complaining about it.

#3 Argoran   Members   -  Reputation: 122

Like
0Likes
Like

Posted 04 June 2006 - 08:29 PM

Thank you.
I have searched the old posts and got the answer.

Then one more question. What are HAL and REF.

#4 _goat   Members   -  Reputation: 804

Like
0Likes
Like

Posted 04 June 2006 - 08:53 PM

You have the DirectX SDK, don't you have the documentation that comes with it?

If not, I suggest you get it. It is undeniably helpful.

Quote:
From the DirectX SDK (February 2005)
Device Types

--------------------------------------------------------------------------------

HAL Device
The primary device type is the hardware abstraction layer (HAL) device, which supports hardware accelerated rasterization and both hardware and software vertex processing. If the computer on which your application is running is equipped with a display adapter that supports Microsoft Direct3D, your application should use it for 3-D operations. Direct3D HAL devices implement all or part of the transformation, lighting, and rasterizing modules in hardware.

Applications do not access graphics adapters directly. They call Direct3D functions and methods. Direct3D accesses the hardware through the HAL. If the computer that your application is running on supports the HAL, it will gain the best performance by using a HAL device.

To create a HAL device, call IDirect3D9::CreateDevice using D3DDEVTYPE_HAL as the device type.

Reference Device
Direct3D supports an additional device type called a reference device or reference rasterizer. Unlike a software device, the reference rasterizer supports every Direct3D feature. Because these features are implemented for accuracy rather than speed and are implemented in software, the results are not very fast. The reference rasterizer does make use of special CPU instructions whenever it can, but it is not intended for retail applications. Use the reference rasterizer only for feature testing or demonstration purposes. To create a reference device, call IDirect3D9::CreateDevice method using D3DDEVTYPE_REF as the device type.


[ search: google ][ programming: msdn | boost | opengl ][ languages: nihongo ]

#5 Argoran   Members   -  Reputation: 122

Like
0Likes
Like

Posted 04 June 2006 - 10:21 PM

Thank you, I got it.

I do not have the documentation. My SDK only have folders of Lib and Include.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS