Drawing shapes to a Texture2D #4245
Unanswered
Chris-Mingay
asked this question in
Q&A
Replies: 2 comments
-
Fantastic, that's exactly what I'm after thank you |
Beta Was this translation helpful? Give feedback.
0 replies
-
For something like this a good approach is to use a RenderTexture. You would create the render texture at whatever atlas resolution you want, then draw your shapes etc onto it once and only once. After that, you would use the render texture as a texture atlas and draw your sprites. There are several examples showing how to use RTs, here is one example: https://www.raylib.com/examples/textures/loader.html?name=textures_mouse_painting |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone, I like using shapes to generate in game sprites etc. However as drawing textures is much cheaper than drawing shapes I'd like to "bake" them to a texture and then just draw said texture.
Is that possible with Raylib?
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions