[Plib-users] Multithreading in FG
Brought to you by:
sjbaker
From: Hemalatha S. <hem...@re...> - 2006-08-28 12:32:04
|
=A0Hi,=0AWe are using Flightgear version 0.9.4, in which we are trying to = implement multi-threading. In one thread, processing of next frame will be = done and in the other, rendering of the previous frame. Here, fgMainLoop() = is split into two threads, all the processing before calling fgRenderFrame(= ) in one thread, i.e. subsystem updates, input/output updates, tile manager= updates, etc., and fgRenderFrame() in the other thread.=0A=0AIs this the = correct method of splitting processing and rendering of frame data?=0A=0AWe= are using the below to create a thread:=0AhThread[1] =3D CreateThread(NULL= ,0,(LPTHREAD_START_ROUTINE)fgRenderFrame1,NULL,0,&dwID[1]);=0A CloseHandle= (hThread[1]);=0A=0AUsing the above gives us stack dump error.=0A=0APlease g= ive us a solution as to how to implement threading.=0AEagerly waiting for y= our reply.=0A=0ARegards,=0AHemalatha=0A=0A |