AllenDang / giu

Cross platform rapid GUI framework for golang based on Dear ImGui.
MIT License
2.11k stars 127 forks source link

backend: add FPS control #770

Closed gucio321 closed 4 months ago

gucio321 commented 4 months ago

from glfw_backend.cpp:

unsigned int glfw_target_fps = 30;
//...
void igSetTargetFPS(unsigned int fps) { glfw_target_fps = fps; }

from glfw_backend.go:

func (b *GLFWBackend) SetTargetFPS(fps uint) {
        C.igSetTargetFPS(C.uint(fps))
}

So you can set it in cimgui-go

In giu we probably need to add something.

Originally posted by @gucio321 in https://github.com/AllenDang/giu/issues/632#issuecomment-1956164982