c++ - FreeType Text Rendering under DirectX 11 -
c++ - FreeType Text Rendering under DirectX 11 -
at moment want render single char freetype , directx 11. how can create "id3d11shaderresourceview" ft_bitmap? tried "d3dx11createshaderresourceviewfromfile" , "d3dx11createtexturefromfile" both doesn't work.
has tutorial or code snippet me?
since ft_bitmap
bitmap loaded memory, can't utilize functions create texture file. instead, you'll want utilize function create texture memory.
you utilize d3dxcreateshaderresourceviewfrommemory
, d3dx library deprecated. mentioned on page, might want instead utilize directxtk or directxtex library create texture memory.
alternatively, can create d3d texture , shader resource view manually using id3d11device::createtexture2d
, id3d11device::createshaderresourceview
.
the tricky part determine dxgi_format
use. need match ft_pixel_mode
of bitmap.
c++ directx-11 freetype
Comments
Post a Comment