开发者

Opengl with another thread for serial comm

I need to get some data from a serial port while rendering some grafix with opengl if 开发者_C百科I create a thread to read from serial port in main and start it before calling the opengl loop will it still work? .the serial writes to global variables which only need to be read by the opengl loop.

D


You'll need to do the usual synchronization between the threads with respect to the shared variables. Beyond that it should be straightforward threading. The fact that you're doing OpenGL in one of the threads shouldn't make any significant difference.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜