c++ - Invalid Parameter when creating a SpriteFont -
i programming in c++ , using spritefont tools comes directxtk. declared variable in class thus:
std::unique_ptr<directx::spritefont> m_spritefont;
i initialized this:
m_spritefont = std::unique_ptr<spritefont>(new spritefont(m_d3ddevice.get(), l"assets\\tnr.spritefont"));
it gives unhandled exception. debugging through program, seems there problem reading file. file generated makespritefont.exe comes toolkit. font times new roman, size 12. have added file assets folder visual studio solution explorer , file in right folder.
what wrong here? missing something?
any help appreciated.
problem solved. simple really, though i'd post here remind not create stupid mistakes made.
when add together existing item using solution explorer in visual studio, check it's properties , create sure participates in build (i.e. item type flag not set "do not participate in build"). set item type "font" , worked.
thank help.
c++ graphics directx spritefont
No comments:
Post a Comment