| Previous | Next |
| D2DERR_OUTSTANDING_BITMAP_REFERENCES | D2DERR_INVALID_TARGET |
D2DERR_ORIGINAL_TARGET_NOT_BOUND
D2DERR_ORIGINAL_TARGET_NOT_BOUND belongs to Direct2D targets, device capabilities, and intermediates. An operation requires the device context’s original target, but that target is no longer bound.
Where the failure occurs
A device context has target identity and is backed by a Direct3D device with format, feature, shader, and maximum-size limits. Temporarily changing targets, requesting unsupported capabilities, or propagating huge effect bounds are different problems. Record target history and capability queries before allocating or drawing.
setTarget changes, BeginDraw/EndDraw scope, and effect or command-list rendering.
Evidence to preserve
- Original and current target identities
- SetTarget call history
- Draw scope and nested rendering operations
- Target options and device-context generation
Smallest faithful reproducer
Use the original target and a small supported bitmap or effect region first. Then change one target, capability, format, or spatial expansion at a time while logging device and context generations.
- Bind the original target before the operation.
- Balance temporary SetTarget changes with restoration.
- Test without command-list or offscreen rendering.
- assert current target at each helper boundary.
Avoid broad resets
INVALID_TARGET concerns whether an image can be used as a target; ORIGINAL_TARGET_NOT_BOUND concerns restoring the context’s expected original target. Do not respond with a universal render-target recreation loop unless the returned status specifically documents device-loss recovery; graph, property, numeric, lifetime, and print-state errors require correcting their contract.
Technical references
Looking for a different code? Search another status or error code.