D3DERR

The following is a list of the values that can be returned by Direct3D methods. See the individual method descriptions for lists of the values that each can return.

ConstantDescription
D3DOK_NOAUTOGEN

This is a success code. However, the autogeneration of mipmaps is not supported for this format. This means that resource creation will succeed but the mipmap levels will not be automatically generated.

D3DERR_CONFLICTINGRENDERSTATE

The currently set render states cannot be used together.

D3DERR_CONFLICTINGTEXTUREFILTER

The current texture filters cannot be used together.

D3DERR_CONFLICTINGTEXTUREPALETTE

The current textures cannot be used simultaneously.

D3DERR_DEVICEHUNG

The device that returned this code caused the hardware adapter to be reset by the OS. Most applications should destroy the device and quit. Applications that must continue should destroy all video memory objects (surfaces, textures, state blocks etc) and call Reset() to put the device in a default state. If the application then continues rendering in the same way, the device will return to this state.

Applies to Direct3D 9Ex only.

D3DERR_DEVICELOST

The device has been lost but cannot be reset at this time. Therefore, rendering is not possible. A Direct3D device object other than the one that returned this code caused the hardware adapter to be reset by the OS. Delete all video memory objects (surfaces, textures, state blocks) and call Reset() to return the device to a default state. If the application continues rendering without a reset, the rendering calls will succeed.

D3DERR_DEVICENOTRESET

The device has been lost but can be reset at this time.

D3DERR_DEVICEREMOVED

The hardware adapter has been removed. Application must destroy the device, do enumeration of adapters and create another Direct3D device. If application continues rendering without calling Reset, the rendering calls will succeed.

Applies to Direct3D 9Ex only.

D3DERR_DRIVERINTERNALERROR

Internal driver error. Applications should destroy and recreate the device when receiving this error. For hints on debugging this error, see Driver Internal Errors (Direct3D 9).

D3DERR_DRIVERINVALIDCALL

Not used.

D3DERR_INVALIDCALL

The method call is invalid. For example, a method's parameter may not be a valid pointer.

D3DERR_INVALIDDEVICE

The requested device type is not valid.

D3DERR_MOREDATA

There is more data available than the specified buffer size can hold.

D3DERR_NOTAVAILABLE

This device does not support the queried technique.

D3DERR_NOTFOUND

The requested item was not found.

D3D_OK

No error occurred.

D3DERR_OUTOFVIDEOMEMORY

Direct3D does not have enough display memory to perform the operation. The device is using more resources in a single scene than can fit simultaneously into video memory. Present, PresentEx, or CheckDeviceState can return this error. Recovery is similar to D3DERR_DEVICEHUNG, though the application may want to reduce its per-frame memory usage as well to avoid having the error recur.

D3DERR_TOOMANYOPERATIONS

The application is requesting more texture-filtering operations than the device supports.

D3DERR_UNSUPPORTEDALPHAARG

The device does not support a specified texture-blending argument for the alpha channel.

D3DERR_UNSUPPORTEDALPHAOPERATION

The device does not support a specified texture-blending operation for the alpha channel.

D3DERR_UNSUPPORTEDCOLORARG

The device does not support a specified texture-blending argument for color values.

D3DERR_UNSUPPORTEDCOLOROPERATION

The device does not support a specified texture-blending operation for color values.

D3DERR_UNSUPPORTEDFACTORVALUE

The device does not support the specified texture factor value. Not used; provided only to support older drivers.

D3DERR_UNSUPPORTEDTEXTUREFILTER

The device does not support the specified texture filter.

D3DERR_WASSTILLDRAWING

The previous blit operation that is transferring information to or from this surface is incomplete.

D3DERR_WRONGTEXTUREFORMAT

The pixel format of the texture surface is not valid.

E_FAIL

An undetermined error occurred inside the Direct3D subsystem.

E_INVALIDARG

An invalid parameter was passed to the returning function.

E_INVALIDCALL

The method call is invalid. For example, a method's parameter may have an invalid value.

E_NOINTERFACE

No object interface is available.

E_NOTIMPL

Not implemented.

E_OUTOFMEMORY

Direct3D could not allocate sufficient memory to complete the call.

S_OK

No error occurred.

S_NOT_RESIDENT

At least one allocation that comprises the resources is on disk. Direct3D 9Ex only.

S_RESIDENT_IN_SHARED_MEMORY

No allocations that comprise the resources are on disk. However, at least one allocation is not in GPU-accessible memory. Direct3D 9Ex only.

S_PRESENT_MODE_CHANGED

The desktop display mode has been changed. The application can continue rendering, but there might be color conversion/stretching. Pick a back buffer format similar to the current display mode, and call Reset to recreate the swap chains. The device will leave this state after a Reset is called. Direct3D 9Ex only.

S_PRESENT_OCCLUDED

The presentation area is occluded. Occlusion means that the presentation window is minimized or another device entered the fullscreen mode on the same monitor as the presentation window and the presentation window is completely on that monitor. Occlusion will not occur if the client area is covered by another Window.

Occluded applications can continue rendering and all calls will succeed, but the occluded presentation window will not be updated. Preferably the application should stop rendering to the presentation window using the device and keep calling CheckDeviceState until S_OK or S_PRESENT_MODE_CHANGED returns.

Direct3D 9Ex only.

D3DERR_UNSUPPORTEDOVERLAY

The device does not support overlay for the specified size or display mode.

Direct3D 9Ex under Windows 7 only.

D3DERR_UNSUPPORTEDOVERLAYFORMAT

The device does not support overlay for the specified surface format.

Direct3D 9Ex under Windows 7 only.

D3DERR_CANNOTPROTECTCONTENT

The specified content cannot be protected.

Direct3D 9Ex under Windows 7 only.

D3DERR_UNSUPPORTEDCRYPTO

The specified cryptographic algorithm is not supported.

Direct3D 9Ex under Windows 7 only.

D3DERR_PRESENT_STATISTICS_DISJOINT

The present statistics have no orderly sequence.

Direct3D 9Ex under Windows 7 only.

Remarks

Errors are represented by negative values and cannot be combined.

Other return codes are contained in S_PRESENT.

The facility code _FACD3D is used to generate error codes, as in the following macros.



// Direct3D Errors
#define D3DERR_UNSUPPORTEDFACTORVALUE  MAKE_D3DHRESULT(2079)
#define D3DERR_WASSTILLDRAWING         MAKE_D3DHRESULT(540)
    
#define _FACD3D                  0x876   // Direct3D facility code
#define MAKE_D3DHRESULT( code )  MAKE_HRESULT( 1, _FACD3D, code )
#define MAKE_D3DSTATUS( code )   MAKE_HRESULT( 0, _FACD3D, code )


Requirements

Header

D3d9.h

See also

Direct3D Constants

 

 

Show: