2 Threaded OpenGL Problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rewb0rn
Posts: 15
Joined: Thu May 25, 2006 9:26 pm
Location: Berlin, Germany

2 Threaded OpenGL Problem

Post by rewb0rn »

Hi Folks,
im having a program using a various number of threads (between 1 and 2 atm^^). It works well for 1 or 2 threads using directx or the software renderers but if i switch to opengl it just renders everything black (no endless loop or something, just whole screen is black), this only appears if i use opengl and 2 threads.
Cause I cant find the mistake im asking if there is any known issue with opengl and multithreading (already searched forums but didnt find anything). Thx in advance!
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

What are your threads being used for? Irrlicht isn't thread safe so this could be a problem to do with that i guess...
Image Image Image
rewb0rn
Posts: 15
Joined: Thu May 25, 2006 9:26 pm
Location: Berlin, Germany

Post by rewb0rn »

Im using 1 for rendering and 1 for updating the scene, but thats only temporarily because i have nothing like ai or anything like that yet ;)
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

Maybe it is the issue with OpenGL that Steve Streeting recently wrote about in his blog: http://www.stevestreeting.com/?p=404

Resources are local to the thread they are created in and if this isn't the thread you render in, then they are not drawn.
rewb0rn
Posts: 15
Joined: Thu May 25, 2006 9:26 pm
Location: Berlin, Germany

Post by rewb0rn »

Yes they are not drawn in that thread, thx alot, has to be it!
Post Reply