0 votes

Hi there! First post.

I'm trying to show a 2D map inside a PopupPanel, that you call by pressing "M", you know, the usual stuff.

I can draw the map using the draw_* primitives, so drawing the map is not the problem.

But because the map can have around 90000 rectangles, it takes around half a second to draw. That could even be acceptable, but...

I know that _draw() is called once and then the draw instructions get memorized. But why is Godot trying to redraw 60 frames of a static drawing? Because of this, the GPU gets overloaded at 99,9%, unnecessarily IMO.

This behavior makes no sense because if draw_* primitives inside _draw() get memorized, they must be constant. And if they are constant, why keep redrawing them?

So, my question is: Is there a way for me to tell Godot to stop redrawing the map for every frame, or make it draw just once, and then update the display only when update() is called?

in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.