www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: AGP on January 22, 2025, 02:19:16 AM

Title: Caching Animations in Software Rendering
Post by: AGP on January 22, 2025, 02:19:16 AM
Is that something you can make the software renderer do? Because otherwise jpct goes through several loops of the animations before they're running at full speed.
Title: Re: Caching Animations in Software Rendering
Post by: EgonOlsen on January 24, 2025, 09:18:44 AM
I'm not sure what you mean be "animations" in this context. There's nothing that "warms up" especially when using the software renderer. The only thing that I can think of is the VM itself. It might take some time to get up to speed with compiling the bytecode into native, but apart from trying to influence that behaviour with some VM switched, there's no way to change this.
Title: Re: Caching Animations in Software Rendering
Post by: AGP on January 28, 2025, 08:54:26 PM
When the program is already running, each animation cycle gets progressively faster. It's probably not noticeable on the OpenGL renderer only because the hardware rendering already starts fast. Is there no way around this apart from delaying the execution, then?
Title: Re: Caching Animations in Software Rendering
Post by: EgonOlsen on January 30, 2025, 12:04:38 PM
It's nothing that I'm doing at least. I can only imagine that it's the JIT-compiler kicking in. Older VMs had the option to compile everything at startup. I'm not sure if this option is still available on newer ones but if it is, it might be worth to try to see if it fixes the problem. It might not be a good option in the end, because it hugely increases startup time, but to track down the problem, it might help.