Skip to content

Commit 4f9c33d

Browse files
numberZerosfan5
authored andcommittedNov 11, 2018
Disable HW stereo for IrrLicht 1.9 (not supported anymore)
1 parent d90e3ea commit 4f9c33d

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed
 

Diff for: ‎src/client/render/factory.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ RenderingCore *createRenderingCore(const std::string &stereo_mode, IrrlichtDevic
3535
return new RenderingCoreAnaglyph(device, client, hud);
3636
if (stereo_mode == "interlaced")
3737
return new RenderingCoreInterlaced(device, client, hud);
38+
#ifdef STEREO_PAGEFLIP_SUPPORTED
3839
if (stereo_mode == "pageflip")
3940
return new RenderingCorePageflip(device, client, hud);
41+
#endif
4042
if (stereo_mode == "sidebyside")
4143
return new RenderingCoreSideBySide(device, client, hud);
4244
if (stereo_mode == "topbottom")

Diff for: ‎src/client/render/pageflip.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2020

2121
#include "pageflip.h"
2222

23+
#ifdef STEREO_PAGEFLIP_SUPPORTED
24+
2325
void RenderingCorePageflip::initTextures()
2426
{
2527
hud = driver->addRenderTargetTexture(
@@ -53,3 +55,5 @@ void RenderingCorePageflip::resetEye()
5355
driver->setRenderTarget(video::ERT_FRAME_BUFFER, false, false, skycolor);
5456
RenderingCoreStereo::resetEye();
5557
}
58+
59+
#endif // STEREO_PAGEFLIP_SUPPORTED

Diff for: ‎src/client/render/pageflip.h

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2121
#pragma once
2222
#include "stereo.h"
2323

24+
// The support is absent in 1.9.0 (dropped in r5068)
25+
#if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR <= 8)
26+
#define STEREO_PAGEFLIP_SUPPORTED
27+
2428
class RenderingCorePageflip : public RenderingCoreStereo
2529
{
2630
protected:
@@ -35,3 +39,5 @@ class RenderingCorePageflip : public RenderingCoreStereo
3539
using RenderingCoreStereo::RenderingCoreStereo;
3640
void drawAll() override;
3741
};
42+
43+
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.