bool flgmip = driver->getTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS);
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
+#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR > 8
+ bool flgcpy = driver->getTextureCreationFlag(video::ETCF_ALLOW_MEMORY_COPY);
+ driver->setTextureCreationFlag(video::ETCF_ALLOW_MEMORY_COPY, true);
+#endif
// Set the texture color format.
switch (pixel_mode)
// Restore our texture creation flags.
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, flgmip);
+#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR > 8
+ driver->setTextureCreationFlag(video::ETCF_ALLOW_MEMORY_COPY, flgcpy);
+#endif
return texture ? true : false;
}
smgr->drop();
// Unset render target
- driver->setRenderTarget(0, false, true, 0);
+ driver->setRenderTarget(0, false, true, video::SColor(0,0,0,0));
if (params.delete_texture_on_shutdown)
m_texture_trash.push_back(rtt);
bool draw_wield_tool, Client& client, gui::IGUIEnvironment* guienv,
video::SColor skycolor)
{
+#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR > 8
+ errorstream << "Pageflip 3D mode is not supported"
+ << " with your Irrlicht version!" << std::endl;
+#else
/* preserve old setup*/
irr::core::vector3df oldPosition = camera.getCameraNode()->getPosition();
irr::core::vector3df oldTarget = camera.getCameraNode()->getTarget();
camera.getCameraNode()->setPosition(oldPosition);
camera.getCameraNode()->setTarget(oldTarget);
+#endif
}
void draw_plain(Camera &camera, bool show_hud, Hud &hud,
void Game::shutdown()
{
+#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR <= 8
if (g_settings->get("3d_mode") == "pageflip") {
driver->setRenderTarget(irr::video::ERT_STEREO_BOTH_BUFFERS);
}
+#endif
showOverlayMessage(wgettext("Shutting down..."), 0, 0, false);
}
else if(event.KeyInput.Char != 0 && !event.KeyInput.Control)
{
- #if (defined(__linux__))
+ #if defined(__linux__) && (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 9)
wchar_t wc = L'_';
mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) );
prompt.input(wc);
#if USE_FREETYPE
#include "cguittfont/xCGUITTFont.h"
#endif
+#ifndef _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
+ // newer Irrlicht versions no longer have this
+ #define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX
+#endif
#include "util/string.h"