Godot Version
Version 4.5.1 stable
Question
Hello,
I’m trying to create Sprite2D images using pure graphics programming. I have been successful drawing on a CanvasItem using those graphics primitives. I don’t understand two things and I am looking for an answer:
- When I call a graphics primitive in my code, like calling the draw_ellipse() function, am I creating a raster / RGBA bitmap of some sort, or an object to be run in a render pipeline? I’ve noticed that the more I use the draw function (once, not per rendering moment), the slower the Godot engine runs.
- What’s the right way to make use of the graphics primitives to create Sprite2D images? I hope I will not have to rewrite all the graphics primitive functions using Image.fill_rect() ; that’s really annoying.
- [Bonus Question] If I put my image creation graphics code into a Shader, is it going to run faster/on the GPU?
Thank you for your time and consideration in responding to or answering these questions.
Sincerely,
-Vexar