aboutsummaryrefslogtreecommitdiff
path: root/src/serialization.cpp
Commit message (Expand)AuthorAge
* Fix compressZlib()Perttu Ahola2012-07-22
* Properly and efficiently use split utility headersPerttu Ahola2012-06-17
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* the zlib error print function now prints to dstream (debug.txt)Perttu Ahola2011-08-08
* Messed around with genmap.py. Now supports format version 17.Perttu Ahola2011-06-05
* Some work-in-progress in hp and mobs and a frightening amount of random fixes.Perttu Ahola2011-04-21
* better graphics, zlib to work on vc++Perttu Ahola2010-12-14
* commit before content-tile separationPerttu Ahola2010-12-13
* license stuffPerttu Ahola2010-11-29
* Initial filesPerttu Ahola2010-11-27
of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "stereo.h" #include "client/camera.h" #include "constants.h" #include "settings.h" RenderingCoreStereo::RenderingCoreStereo( IrrlichtDevice *_device, Client *_client, Hud *_hud) : RenderingCore(_device, _client, _hud) { eye_offset = BS * g_settings->getFloat("3d_paralax_strength"); } void RenderingCoreStereo::beforeDraw() { cam = camera->getCameraNode(); base_transform = cam->getRelativeTransformation(); } void RenderingCoreStereo::useEye(bool right) { core::matrix4 move; move.setTranslation( core::vector3df(right ? eye_offset : -eye_offset, 0.0f, 0.0f)); cam->setPosition((base_transform * move).getTranslation()); } void RenderingCoreStereo::resetEye() { cam->setPosition(base_transform.getTranslation()); } void RenderingCoreStereo::renderBothImages() { useEye(false); draw3D(); resetEye(); useEye(true); draw3D(); resetEye(); }