husker-dev / openglfx

OpenGL implementation for JavaFX
Apache License 2.0
80 stars 10 forks source link

4.05 Still Flower Screen! #78

Open qq1053831109 opened 3 months ago

qq1053831109 commented 3 months ago

4.05 Still Flower Screen。 Asynchronous performance is worrying。 It is recommended to do multithreading on the basis of synchronization。 Is there a method that doesn't require copying textures?

qq1053831109 commented 3 months ago

Automatically discard the current frame when the gl drawing time expires. Wait for the gl drawing speed to exceed 10 fps before starting synchronization. Because in some cases, gl may get stuck in the loading scene, at which point fx does not need to block and wait for gl. Fx needs to display the loading circle animation at this time!

qq1053831109 commented 3 months ago

The asynchronous drawing board of 4.0.5 is many times slower than that of 4.0.0

husker-dev commented 3 months ago

The asynchronous method implies two OpenGL contexts (for drawing and outputting an image). Since in OpenGL you cannot send framebuffer between contexts, you have to use textures. The method you propose is not entirely asynchronous.

I plan to rewrite this logic in the near future using built-in GLsync mechanism, but I’m very busy right now, so I don't have much time for this. I'll get it to work today, and maybe over the weekend. There's a lot of work to be done.