Running irrlicht's beginScene with differen threads?
Posted: Sat Aug 18, 2012 6:03 am
Hello,
is it possible to run beginScene() with thread 1, and then with another thread, named thread 2? Also, is it possible to do the initial setup, like createDevice(), with a different thread as I run beginScene() with?
Here's a valgrind output:
Thanks for your help.
Greetings,
Johannes
is it possible to run beginScene() with thread 1, and then with another thread, named thread 2? Also, is it possible to do the initial setup, like createDevice(), with a different thread as I run beginScene() with?
Here's a valgrind output:
Code: Select all
==11811== Thread 2:
==11811== Invalid read of size 4
==11811== at 0x41637E6: ??? (in /usr/X11R6/lib/libGL.so.295.71)
==11811== by 0x81096B9: irr::video::COpenGLDriver::beginScene(bool, bool, irr::video::SColor, irr::video::SExposedVideoData const&, irr::core::rect<int>*) (COpenGLDriver.cpp:840)
==11811== by 0x8065661: IrrlichtBase::update_graphics() (irrlicht_base.cpp:67)
==11811== by 0x8064E20: CoreModule::do_work_on_timeout(boost::posix_time::ptime const&) (core_module.h:38)
==11811== by 0x40993B2: Task::do_exec(ThreadPool*, boost::posix_time::ptime const&, bool) (task.h:92)
==11811== by 0x409944C: Task::exec(ThreadPool*, boost::posix_time::ptime, bool) (task.h:116)
==11811== by 0x4099BB4: ThreadPool::do_work(int) (thread_pool.h:462)
==11811== by 0x4097C88: ThreadBase::run() (thread_worker.cpp:66)
==11811== by 0x44BFBC7: thread_proxy (in /usr/lib/libboost_thread.so.1.46.1)
==11811== by 0x4400D5D: clone (in /lib/libc-2.11.3.so)
==11811== Address 0x27c is not stack'd, malloc'd or (recently) free'd
==11811==
==11811==
==11811== Process terminating with default action of signal 11 (SIGSEGV)
==11811== Access not within mapped region at address 0x27C
==11811== at 0x41637E6: ??? (in /usr/X11R6/lib/libGL.so.295.71)
==11811== by 0x81096B9: irr::video::COpenGLDriver::beginScene(bool, bool, irr::video::SColor, irr::video::SExposedVideoData const&, irr::core::rect<int>*) (COpenGLDriver.cpp:840)
==11811== by 0x8065661: IrrlichtBase::update_graphics() (irrlicht_base.cpp:67)
==11811== by 0x8064E20: CoreModule::do_work_on_timeout(boost::posix_time::ptime const&) (core_module.h:38)
==11811== by 0x40993B2: Task::do_exec(ThreadPool*, boost::posix_time::ptime const&, bool) (task.h:92)
==11811== by 0x409944C: Task::exec(ThreadPool*, boost::posix_time::ptime, bool) (task.h:116)
==11811== by 0x4099BB4: ThreadPool::do_work(int) (thread_pool.h:462)
==11811== by 0x4097C88: ThreadBase::run() (thread_worker.cpp:66)
==11811== by 0x44BFBC7: thread_proxy (in /usr/lib/libboost_thread.so.1.46.1)
==11811== by 0x4400D5D: clone (in /lib/libc-2.11.3.so)
Greetings,
Johannes