Closed steven-ray closed 7 years ago
This is by design. The January 2016 version of DirectXTK added this requirement so that the library could support Xbox One XDK apps using DirectX 11.X "Fast Semantics" as well as "Standard Semantics".
Add the GraphicsMemory singleton to your application. It's not an automatically created singleton because you must also be sure to call Commit
as part of your presentation loop for proper function.
You can create a
GraphicsMemory
instance for PC and/or UWP as well, but it's an empty implementation so it does nothing.
On an Xbox One build, SpriteBatch::End() results in an exception: "GraphicsMemory singleton not created".
This appears to come from SpriteBatch::Impl::PrepareForRendering() where the following statements are present:
In this case, SetData calls GraphicsMemory::Get().Allocate() which fails with the above exception.
My code used to work back in 11/15 with older versions of the DirectXTK. Revisiting and updating and encountering this error...