Page 1 of 1

another thread to createWindow

Posted: Fri Sep 16, 2011 02:04
by dcboy
in my project,there have socket recv thread,when recv some package,then go to processPackage

DWORD WINAPI ProcessThread(LPVOID params)

//when in here invoke createWindow method the programe is crash!!!!
WindowManager& winMgr = WindowManager::getSingleton();

Window* frame = winMgr.getWindow("Demo/Window");

Window* button = winMgr.createWindow("OgreTray/Button","test");

button->setProperty("Text", tagList->RoomVector[i].RoomName);

why is crash!!!!! cegui dosn't support mulit-thread?

Re: another thread to createWindow

Posted: Fri Sep 16, 2011 09:39
by Kulik
CEGUI is not thread safe, you have to use synchronisation primitives and/or queues to make this work.

Re: another thread to createWindow

Posted: Tue Oct 09, 2012 02:55
by super999
whatever you render platform base on DirectX or OpenGL or Opengl ES ,
these are support multi render content to make multi thread Render devices work.
I get this same problem when use cegui in IOS platform { Opengl ES 1.1 }, then to create multi render content for easy render thread to solove this problem.

sorry for my English , I'm Chinese.