I searched a lot without finding how to have a compute shader draw lines and characters in a texture2D.
My application has to do a lot of processing and generate a bitmap in a texture2D which is then rendered on screen and downloaded back to CPU and finally saved in a file. After the bitmap is generated, I have to draw lines (and other simple geometric shapes) as well as character strings to annotate the bitmap. I'm stuck on this stage.
btw: I'm using MSVC2015, DirectX/DirectCompute11, NVidia K4200 GPU.
Any help appreciated.
I finally solved my problem by implementing a classic algorithm to draw line on a rasterized image. I started from this code which is C code but very easy to translate to HLSL. This implementation produce lines of any thickness.
I also wrote code to write characters to the texture2D the old way: I got a dot matrix font (There are a lot free to find on the internet), stored in a ByteAddressBuffer and copy pixel from that font to the texture2D. I make it easy to use by writing a few functions to "print" various data at given coordinates in the texture2D. That works very well for what I needed.