Drawing a Graphic on a Separate Thread

Started by AGP, February 01, 2018, 03:35:33 AM

Previous topic - Next topic

AGP

Hardware renderer in (lwjgl's frame) fullscreen throws a RuntimeException ("No OpenGL context found in the current thread."). I created a WorldProcessor with two threads as well as tried it the lwjgl way (GLContext.useContext()). Neither worked.

EgonOlsen

Why would you want to do that? The GPU has to serialize the rendering anyway...

AGP

It's a pre-splash graphic that's meant to run while the game is loading. Load time is as much as 20 seconds and I don't want a black or even just a static screen for that long.

AGP


EgonOlsen

Then why don't you do the loading in a different thread and let the main thread render the splash screen? That's what I'm doing in Naroth as well.

AGP