D3DERR
Errors are represented by negative values and cannot be combined. 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. These lists are not necessarily comprehensive.
typedef enum D3DERR
{
D3D_OK,
D3DOK_NOAUTOGEN,
D3DERR_CONFLICTINGRENDERSTATE,
D3DERR_CONFLICTINGTEXTUREFILTER,
D3DERR_CONFLICTINGTEXTUREPALETTE,
D3DERR_DEVICELOST,
D3DERR_DEVICENOTRESET,
D3DERR_DRIVERINTERNALERROR,
D3DERR_DRIVERINVALIDCALL,
D3DERR_INVALIDCALL,
D3DERR_INVALIDDEVICE,
D3DERR_MOREDATA,
D3DERR_NOTAVAILABLE,
D3DERR_NOTFOUND,
D3DERR_OUTOFVIDEOMEMORY,
D3DERR_TOOMANYOPERATIONS,
D3DERR_UNSUPPORTEDALPHAARG,
D3DERR_UNSUPPORTEDALPHAOPERATION,
D3DERR_UNSUPPORTEDCOLORARG,
D3DERR_UNSUPPORTEDCOLOROPERATION,
D3DERR_UNSUPPORTEDFACTORVALUE,
D3DERR_UNSUPPORTEDTEXTUREFILTER,
D3DERR_WASSTILLDRAWING,
D3DERR_WRONGTEXTUREFORMAT,
E_FAIL,
E_INVALIDARG,
E_INVALIDCALL,
E_NOINTERFACE,
E_NOTIMPL,
E_OUTOFMEMORY,
S_OK,
} D3DERR, *LPD3DERR;
Constants
- D3D_OK
- No error occurred.
- 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_DEVICELOST
- The device has been lost but cannot be reset at this time. Therefore, rendering is not possible.
- D3DERR_DEVICENOTRESET
- The device has been lost but can be reset at this time.
- 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.
- 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.
- D3DERR_OUTOFVIDEOMEMORY
- Direct3D does not have enough display memory to perform the operation.
- 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.
Remarks
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 )