In my game, I have created multiple windows that all render their own content. I’m trying to limit the frame rate of an individual window (e.g. window A is capped at 60 FPS, and window B is capped at 30 FPS).
I’ve found the GEngine->SetMaxFPS() function, but that sets the frame rate for the whole engine. Is there a similar function that can be used for a specific window?
I’m willing to modify the source code if that is what it takes.
I’ll start with a simpler, more understandable answer first. It isn’t really what I’m doing, but it’s an analogy. Imagine I have a main game window where all the action happens, and a 2nd window that is not as important (secondary camera or a monitor or something). Naturally I want the main game window to be running optimally since the player does everything in it. One way to do this is to reduce the frame rate of the 2nd window. I’ve checked the frame rate for both windows and they currently run at the same framerate, which is a waste.
The complex answer (and what I’m really doing): I’m trying to do some resource management. I’ve been modifying the engine so that 1 game process allows for multiple game windows, each having their own game instance, game world, and player. It’s like split screen, but using separate windows and the players are not in a shared world. I’d like to have the ability to control the maximum frame rate a particular player’s window will get. If it sounds strange… I’m doing some research.
Ok I have no idea how to that, I just want to make a remark: Having 2 windows of the same game run at different framerates will look very strange. Especially since you have got a direct comparison of the better framerate, the lower framerate will just come of worse.