aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2015-12-14 19:01:32 -0200
committersfan5 <sfan5@live.de>2016-01-09 16:52:29 +0100
commit9943ae3f1a4fa1b687c780419b7f3a2d8091abe0 (patch)
treeccef2ab8002f276b6a2c4e4fb8cdb8d0064ff49b /src/client
parentfe3f6be4d262b466cd511595ad3b3c9bd5c89ea1 (diff)
downloadminetest-9943ae3f1a4fa1b687c780419b7f3a2d8091abe0.tar.gz
minetest-9943ae3f1a4fa1b687c780419b7f3a2d8091abe0.tar.bz2
minetest-9943ae3f1a4fa1b687c780419b7f3a2d8091abe0.zip
New 3D Mode: Pageflip
The pageflip mode requires a stereo quadbuffer, and a modern graphic card. Patch tested with NVidia 3D Vision. The mini-map is not drawn, but that's what is done for topbottom and sidebyside modes as well. Also most of the time the user would prefer the HUD to be off. That's for the user to decide though, and toggle it manually. Finally, the interocular distance (aka eye separation) is twice as much as the "3d_paralax_strength" settings. I find this a strange design decision. I didn't want to chance this though, since it's how the other 3d modes interpret this settings.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/clientlauncher.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp
index dfddef34e..be6426627 100644
--- a/src/client/clientlauncher.cpp
+++ b/src/client/clientlauncher.cpp
@@ -512,6 +512,9 @@ bool ClientLauncher::create_engine_device()
u16 bits = g_settings->getU16("fullscreen_bpp");
u16 fsaa = g_settings->getU16("fsaa");
+ // stereo buffer required for pageflip stereo
+ bool stereo_buffer = g_settings->get("3d_mode") == "pageflip";
+
// Determine driver
video::E_DRIVER_TYPE driverType = video::EDT_OPENGL;
std::string driverstring = g_settings->get("video_driver");
@@ -537,6 +540,7 @@ bool ClientLauncher::create_engine_device()
params.AntiAlias = fsaa;
params.Fullscreen = fullscreen;
params.Stencilbuffer = false;
+ params.Stereobuffer = stereo_buffer;
params.Vsync = vsync;
params.EventReceiver = receiver;
params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");