Hi, I was wondering is it possible to use gtk-rs to integrate it into a game engine?
That’s a very vague question.
Yes, it’s possible to use GTK to manage a top level game window, and then use a custom widget—something based on
GtkGLArea, or entirely custom—to draw the game contents.
It mainly depends on things like:
- is the “game engine” responsible only for game entities and requires you to draw things?
- is the “game engine” responsible for drawing, and assumes your code deals with initialising the rendering pipeline?
- is the “game engine” responsible for drawing, and manages the graphics pipeline?
- is the “game engine” responsible for spinning a frame loop?
So the game engine is actually using WGPU and if you take a look at egui
It does integrate to any game engines out there. So can gtk-rs integrate in a game engine like the way egui does?
You still haven’t said what you expect with “integration”.
Do you want to draw game elements with GTK? Do you want to create a top level and then draw then game inside it?
You will need to be more specific if you want to get a meaningful answer. Egui is an immediate mode UI toolkit,
No it doesn’t use gtk to draw stuff, so I assume you can’t use gtk with the game engine?
Then why do you want to use GTK? What is it that you’re trying to achieve?
Feel free to assume that, at this point. You have been incredibly uncooperative, for a person asking for help.