Return Values

Errors are represented by negative values and cannot be combined. This table lists the values that can be returned by all Direct3D Immediate Mode methods. See the individual method descriptions for lists of the values each can return.

D3D_OK
D3DERR_BADMAJORVERSION
D3DERR_BADMINORVERSION
D3DERR_DEVICEAGGREGATED (new for DirectX 5)
D3DERR_EXECUTE_CLIPPED_FAILED
D3DERR_EXECUTE_CREATE_FAILED
D3DERR_EXECUTE_DESTROY_FAILED
D3DERR_EXECUTE_FAILED
D3DERR_EXECUTE_LOCK_FAILED
D3DERR_EXECUTE_LOCKED
D3DERR_EXECUTE_NOT_LOCKED
D3DERR_EXECUTE_UNLOCK_FAILED
D3DERR_INITFAILED (new for DirectX 5)
D3DERR_INBEGIN (new for DirectX 5)
D3DERR_INVALID_DEVICE (new for DirectX 5)
D3DERR_INVALIDCURRENTVIEWPORT (new for DirectX 5)
D3DERR_INVALIDPALETTE(new for DirectX 5)
D3DERR_INVALIDPRIMITIVETYPE (new for DirectX 5)
D3DERR_INVALIDRAMPTEXTURE (new for DirectX 5)
D3DERR_INVALIDVERTEXTYPE (new for DirectX 5)
D3DERR_LIGHT_SET_FAILED
D3DERR_LIGHTHASVIEWPORT (new for DirectX 5)
D3DERR_LIGHTNOTINTHISVIEWPORT (new for DirectX 5)
D3DERR_MATERIAL_CREATE_FAILED
D3DERR_MATERIAL_DESTROY_FAILED
D3DERR_MATERIAL_GETDATA_FAILED
D3DERR_MATERIAL_SETDATA_FAILED
D3DERR_MATRIX_CREATE_FAILED
D3DERR_MATRIX_DESTROY_FAILED
D3DERR_MATRIX_GETDATA_FAILED
D3DERR_MATRIX_SETDATA_FAILED
D3DERR_NOCURRENTVIEWPORT (new for DirectX 5)
D3DERR_NOTINBEGIN (new for DirectX 5)
D3DERR_NOVIEWPORTS (new for DirectX 5)
D3DERR_SCENE_BEGIN_FAILED
D3DERR_SCENE_END_FAILED
D3DERR_SCENE_IN_SCENE
D3DERR_SCENE_NOT_IN_SCENE
D3DERR_SETVIEWPORTDATA_FAILED
D3DERR_SURFACENOTINVIDMEM (new for DirectX 5)
D3DERR_TEXTURE_BADSIZE (new for DirectX 5)
D3DERR_TEXTURE_CREATE_FAILED
D3DERR_TEXTURE_DESTROY_FAILED
D3DERR_TEXTURE_GETSURF_FAILED
D3DERR_TEXTURE_LOAD_FAILED
D3DERR_TEXTURE_LOCK_FAILED
D3DERR_TEXTURE_LOCKED
D3DERR_TEXTURE_NO_SUPPORT
D3DERR_TEXTURE_NOT_LOCKED
D3DERR_TEXTURE_SWAP_FAILED
D3DERR_TEXTURE_UNLOCK_FAILED
D3DERR_VIEWPORTDATANOTSET (new for DirectX 5)
D3DERR_VIEWPORTHASNODEVICE (new for DirectX 5)
D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY (new for DirectX 5)
D3DERR_ZBUFF_NEEDS_VIDEOMEMORY (new for DirectX 5)