spring/spring — pull request #128 by xponen (2014-09-04 07:59:33+00:00)
Title: Propose Spring to render same world twice to assist stereoscopic widget (with a working code)

ZK included a stereoscopic widget that emulate 3D vision by moving camera left & right ( https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaUI/Widgets/gfx_stereo3d.lua ) . But the method used by this widget cannot work properly for moving units. If Spring could render same world twice then that method could work!

I have tried it, here is the result with rendering twice:
(try to focus on the circular white cursor using cross-eye technique)
![stereoscopic- with doubledraw](https://cloud.githubusercontent.com/assets/2525365/4146207/efac2a04-3407-11e4-95d7-9c8dc5b237e7.jpg)

The following is the same scene but without rendering twice:
![stereoscopic- no doubledraw](https://cloud.githubusercontent.com/assets/2525365/4146238/4a2565a4-3408-11e4-92d6-fd0e46ee8cda.jpg)

The boat in the centre is moving and it doesn't 3D correctly in second image.

In the proposed code change I add the following Interface:
/doubledraw 1|0 : enable/disable double drawing
Spring.IsDoubleDrawing(): to check if double drawing is active
Spring.GetDoubleDrawIndex(): output 1 or 2 to assist widget to select which draw-frame to displayed as left-eye or right-eye