Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Drawing a Graphic on a Separate Thread
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Drawing a Graphic on a Separate Thread (Read 3621 times)
AGP
quad
Posts: 1726
Drawing a Graphic on a Separate Thread
«
on:
February 01, 2018, 03:35:33 am »
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.
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: Drawing a Graphic on a Separate Thread
«
Reply #1 on:
February 01, 2018, 09:31:01 am »
Why would you want to do that? The GPU has to serialize the rendering anyway...
Logged
AGP
quad
Posts: 1726
Re: Drawing a Graphic on a Separate Thread
«
Reply #2 on:
February 01, 2018, 05:34:44 pm »
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.
Logged
AGP
quad
Posts: 1726
Re: Drawing a Graphic on a Separate Thread
«
Reply #3 on:
February 02, 2018, 09:35:50 pm »
So, do you have a response?
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: Drawing a Graphic on a Separate Thread
«
Reply #4 on:
February 05, 2018, 09:44:18 am »
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.
Logged
AGP
quad
Posts: 1726
Re: Drawing a Graphic on a Separate Thread
«
Reply #5 on:
February 06, 2018, 06:36:09 pm »
That makes sense, thanks.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Drawing a Graphic on a Separate Thread