Hello,
I am developing simple 2D GUI apps (simple buttons, sliders etc) on MS Windows 11
I think Direct2D offers API’s for this (drawing rectangles, lines, text strings, image files)
Of course, MS Windows GDI has such functions but Direct2D is much better
(JUCE API’s are such a GUI tool using Direct2D)
Then, does Vulkan offer such functions like those Direct2D offers?
Thank you
2 Likes
As a Vulkan beginner I answer this question with like OpenGL unfortunately not direct.
I have planned to create an engine for such things for the purpose of education. But there also exist other implementations on GitHub as example.
My idea behind my 2D engine is to create a simple shader which does only draw a pixel (two triangles) at a specific position and with a specific color. So I have the basic function to set a pixel. Then only must implement the other higher functions with this basic function. Hope this intention works. BTW, for drawing images I could also use the Vulkan functions to draw a texture. I think this is much faster, then drawing a image only with a set pixel function.
I have experience in embedded applications, like drawing lines, images and text on graphic displays, so I must don’t rewrite these algorithms for drawing a line as example anymore. Only modify these algorithms for the usage with Vulkan.
Maybe not efficient, but as a beginner I don’t have the knowledge and experience for a better solution.