c++ - Using SpriteBatch with Direct3D and XAML -
i have created project runs on windows phone 8 uses template direct3d xaml provided windows phone sdk. have incorporated directxtk , declared std::unique_ptr<directx::spritebatch> m_sb; in cuberenderer.h
when seek assign in function createdeviceresources thus:
m_sb.reset(new spritebatch(m_d3dcontext.get())); it gives error: unhandled exception of type 'system.accessviolationexception' occurred in unknown module.
i not know why is. works if create project direct3d (native) template.
any help appreciated.
you have set code within createwindowsizedependentresources function, should work fine.
source
c++ xaml directx spritebatch
No comments:
Post a Comment