Skip to content
matricks edited this page Dec 31, 2011 · 2 revisions

This branch I’m doing work on removing the OpenGL render calls from the main thread into a new separate thread.

Reason

The reason to do this is to make so that the network, input and game can update without waiting for the vsync:ed flip. This will reduce the latency in the network and input.

Design

All graphics commands are put into a (CCommandBuffer) that is later pushed to a separate thread (CCommandProcessorHandler) that executes that buffer. The buffer is pushed during the IGraphics::Swap call.

The source

The whole implementation lives in graphics_threaded.h and graphics_threaded.cpp. No changes is done to the graphics interface as of yet but a smaller change will be needed to finalize it.

Future work

  • The CCommandBuffer should perhaps be a ring buffer.

Clone this wiki locally