Skip to content

Instantly share code, notes, and snippets.

@sfan5 sfan5/01readme.md
Last active Apr 8, 2017

Embed
What would you like to do?
Raspberry Pi support for Minetest

I'm not actually sure in how far this works other than that it compiles cleanly.

Also note that Minetest will need lots of changes where #ifdef __ANDROID__ appears to include the rpi too.

one patch is for Irrlicht (ogl-es)

other is for Minetest

From c66168ee78d7300a217a6a2d27346e960c046cfc Mon Sep 17 00:00:00 2001
From: sfan5 <sfan5@live.de>
Date: Sat, 8 Apr 2017 17:21:15 +0200
Subject: [PATCH] half-working(?) rpi support
IMPORTANT: this commit is based on 58fa0cf3419c2733159fc3c6253634bedada3bfe of https://github.com/zaki/irrlicht "ogl-es" branch
any newer commits reveal some bugs that might have been fixed in https://github.com/minetest/minetest/commit/084cdea6862cb65fe4bb807a211a9e1c17cffec8
k_eglGetDisplayCopy.c was taken from here https://github.com/kika123/x11eglrpi/blob/master/k_eglGetDisplayCopy.c and attempts to make X11 windows + EGL work on rpi
---
.gitignore | 4 +
source/Irrlicht/CEGLManager.h | 2 +-
source/Irrlicht/COGLESTexture.h | 5 +-
source/Irrlicht/Makefile | 6 +-
source/Irrlicht/k_eglGetDisplayCopy.c | 150 ++++++++++++++++++++++++++++++++++
5 files changed, 160 insertions(+), 7 deletions(-)
create mode 100644 .gitignore
create mode 100644 source/Irrlicht/k_eglGetDisplayCopy.c
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..b2e26c2a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.d
+*.o
+lib/Linux/*.a
+source/Irrlicht/*.a
diff --git a/source/Irrlicht/CEGLManager.h b/source/Irrlicht/CEGLManager.h
index 5a117b24..6851963d 100755
--- a/source/Irrlicht/CEGLManager.h
+++ b/source/Irrlicht/CEGLManager.h
@@ -12,7 +12,7 @@
#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_) || defined(_IRR_COMPILE_WITH_FB_DEVICE_)
#include <EGL/egl.h>
#else
-#include <GLES/egl.h>
+#include <EGL/egl.h>
#endif
#include "SIrrCreationParameters.h"
diff --git a/source/Irrlicht/COGLESTexture.h b/source/Irrlicht/COGLESTexture.h
index 2ff56fec..ad472298 100644
--- a/source/Irrlicht/COGLESTexture.h
+++ b/source/Irrlicht/COGLESTexture.h
@@ -14,11 +14,10 @@
#if defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
#include <OpenGLES/ES1/gl.h>
#include <OpenGLES/ES1/glext.h>
-#elif defined(_IRR_ANDROID_PLATFORM_)
+#else
#include <GLES/gl.h>
#include <GLES/glext.h>
-#else
-#include <GLES/egl.h>
+#include <EGL/egl.h>
#endif
namespace irr
diff --git a/source/Irrlicht/Makefile b/source/Irrlicht/Makefile
index a5a6edc6..53a78ea0 100644
--- a/source/Irrlicht/Makefile
+++ b/source/Irrlicht/Makefile
@@ -44,7 +44,7 @@ IRRIMAGEOBJ = CColorConverter.o CImage.o CImageLoaderBMP.o CImageLoaderDDS.o CIm
IRRVIDEOOBJ = CVideoModeList.o CFPSCounter.o $(IRRDRVROBJ) $(IRRIMAGEOBJ)
IRRSWRENDEROBJ = CSoftwareDriver.o CSoftwareTexture.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRNormalMap.o CTRStencilShadow.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudAdd.o CTRTextureGouraudNoZ.o CTRTextureGouraudWire.o CZBuffer.o CTRTextureGouraudVertexAlpha2.o CTRTextureGouraudNoZ2.o CTRTextureLightMap2_M2.o CTRTextureLightMap2_M4.o CTRTextureLightMap2_M1.o CSoftwareDriver2.o CSoftwareTexture2.o CTRTextureGouraud2.o CTRGouraud2.o CTRGouraudAlpha2.o CTRGouraudAlphaNoZ2.o CTRTextureDetailMap2.o CTRTextureGouraudAdd2.o CTRTextureGouraudAddNoZ2.o CTRTextureWire2.o CTRTextureLightMap2_Add.o CTRTextureLightMapGouraud2_M4.o IBurningShader.o CTRTextureBlend.o CTRTextureGouraudAlpha.o CTRTextureGouraudAlphaNoZ.o CDepthBuffer.o CBurningShader_Raster_Reference.o
IRRIOOBJ = CFileList.o CFileSystem.o CLimitReadFile.o CMemoryFile.o CReadFile.o CWriteFile.o CXMLReader.o CXMLWriter.o CWADReader.o CZipReader.o CPakReader.o CNPKReader.o CTarReader.o CMountPointReader.o irrXML.o CAttributes.o lzma/LzmaDec.o
-IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o leakHunter.o CProfiler.o utf8.o
+IRROTHEROBJ = CIrrDeviceSDL.o CIrrDeviceLinux.o CIrrDeviceConsole.o CIrrDeviceStub.o CIrrDeviceWin32.o CIrrDeviceFB.o CLogger.o COSOperator.o Irrlicht.o os.o leakHunter.o CProfiler.o utf8.o k_eglGetDisplayCopy.o
IRRGUIOBJ = CGUIButton.o CGUICheckBox.o CGUIComboBox.o CGUIContextMenu.o CGUIEditBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIInOutFader.o CGUIListBox.o CGUIMenu.o CGUIMeshViewer.o CGUIMessageBox.o CGUIModalScreen.o CGUIScrollBar.o CGUISpinBox.o CGUISkin.o CGUIStaticText.o CGUITabControl.o CGUITable.o CGUIToolBar.o CGUIWindow.o CGUIColorSelectDialog.o CDefaultGUIElementFactory.o CGUISpriteBank.o CGUIImageList.o CGUITreeView.o CGUIProfiler.o
ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
JPEGLIBOBJ = jpeglib/jcapimin.o jpeglib/jcapistd.o jpeglib/jccoefct.o jpeglib/jccolor.o jpeglib/jcdctmgr.o jpeglib/jchuff.o jpeglib/jcinit.o jpeglib/jcmainct.o jpeglib/jcmarker.o jpeglib/jcmaster.o jpeglib/jcomapi.o jpeglib/jcparam.o jpeglib/jcprepct.o jpeglib/jcsample.o jpeglib/jctrans.o jpeglib/jdapimin.o jpeglib/jdapistd.o jpeglib/jdatadst.o jpeglib/jdatasrc.o jpeglib/jdcoefct.o jpeglib/jdcolor.o jpeglib/jddctmgr.o jpeglib/jdhuff.o jpeglib/jdinput.o jpeglib/jdmainct.o jpeglib/jdmarker.o jpeglib/jdmaster.o jpeglib/jdmerge.o jpeglib/jdpostct.o jpeglib/jdsample.o jpeglib/jdtrans.o jpeglib/jerror.o jpeglib/jfdctflt.o jpeglib/jfdctfst.o jpeglib/jfdctint.o jpeglib/jidctflt.o jpeglib/jidctfst.o jpeglib/jidctint.o jpeglib/jmemmgr.o jpeglib/jmemnobs.o jpeglib/jquant1.o jpeglib/jquant2.o jpeglib/jutils.o jpeglib/jcarith.o jpeglib/jdarith.o jpeglib/jaricom.o
@@ -62,7 +62,7 @@ LINKOBJ = $(IRRMESHOBJ) $(IRROBJ) $(IRRPARTICLEOBJ) $(IRRANIMOBJ) \
###############
#Compiler flags
-CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng
+CXXINCS = -I../../include -Izlib -Ijpeglib -Ilibpng -I/opt/vc/include
CPPFLAGS += $(CXXINCS) -DIRRLICHT_EXPORTS=1
CXXFLAGS += -Wall -pipe -fno-exceptions -fno-rtti -fstrict-aliasing
ifndef NDEBUG
@@ -89,7 +89,7 @@ STATIC_LIB = libIrrlicht.a
LIB_PATH = ../../lib/$(SYSTEM)
INSTALL_DIR = /usr/local/lib
sharedlib install: SHARED_LIB = libIrrlicht.so
-sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lXxf86vm
+sharedlib: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lXxf86vm
staticlib sharedlib: CXXINCS += -I/usr/X11R6/include
#OSX specific options
diff --git a/source/Irrlicht/k_eglGetDisplayCopy.c b/source/Irrlicht/k_eglGetDisplayCopy.c
new file mode 100644
index 00000000..8643320a
--- /dev/null
+++ b/source/Irrlicht/k_eglGetDisplayCopy.c
@@ -0,0 +1,150 @@
+#define _GNU_SOURCE
+#include <EGL/egl.h>
+#include <EGL/eglext_brcm.h>
+#include <GLES2/gl2.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <sys/time.h>
+#include <math.h>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+#include <dlfcn.h>
+/* This file is part of X11EGLRPI
+Copyright (C)2014 Mohamed MEDIOUNI
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU 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.
+
+*/
+
+#define X11EGLRPI_EXPERIMENTAL_DLSYM
+#ifdef X11EGLRPI_EXPERIMENTAL_DLSYM
+static int (*real_eglGetDisplay)(NativeDisplayType) = NULL;
+static EGLSurface (*real_eglCreateWindowSurface)(EGLDisplay egldisplay, EGLConfig config, NativeWindowType native_window, EGLint const * attrib_list) = NULL;
+static EGLBoolean (*real_eglSwapBuffers)(EGLDisplay edisplay, EGLSurface egsurface) = NULL;
+#endif
+static int x11_enabled = 0;
+Window* root;
+Window* window;
+EGLDisplay *edisplay;
+int width, height,depth;
+Display* display;
+EGLSurface egl_surface;
+XWindowAttributes *window_attributes_return;
+EGLDisplay eglGetDisplay(NativeDisplayType native_display) {
+#ifdef X11EGLRPI_EXPERIMENTAL_DLSYM
+ real_eglGetDisplay = dlsym(RTLD_NEXT, "eglGetDisplay");
+ real_eglCreateWindowSurface = dlsym(RTLD_NEXT,"eglCreateWindowSurface");
+ real_eglSwapBuffers= dlsym(RTLD_NEXT,"eglSwapBuffers");
+#endif
+ if ( native_display == EGL_DEFAULT_DISPLAY) {
+ x11_enabled=0;
+ return real_eglGetDisplay(native_display);
+ }
+ x11_enabled=1;
+ puts("Getting an X11 EGL Display.");
+ bcm_host_init();
+ display = (Display*)native_display;
+ root = DefaultRootWindow(display);
+ edisplay = real_eglGetDisplay(EGL_DEFAULT_DISPLAY);
+ return edisplay;
+}
+EGLSurface eglCreateWindowSurface(EGLDisplay egldisplay, EGLConfig config, NativeWindowType native_window, EGLint const * attrib_list) {
+ if (x11_enabled == 0) {
+ return real_eglCreateWindowSurface(egldisplay,config,native_window,attrib_list);
+ }
+ window = (Window*) native_window;
+ puts("Getting window information...");
+ XWindowAttributes window_attributes;
+ XGetWindowAttributes(display,window,&window_attributes);
+ printf("Window Location: %i,%i \n Window Dimensions %i x %i \n Bit depth : %i \n",window_attributes.x,window_attributes.y,window_attributes.width,window_attributes.height,window_attributes.depth);
+ width=window_attributes.width ;
+ height=window_attributes.height;
+ depth=window_attributes.depth;
+ EGLint attr[] = { // some attributes to set up our egl-interface
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_ALPHA_SIZE, 8,
+ EGL_SURFACE_TYPE,
+ EGL_PIXMAP_BIT | EGL_OPENGL_ES2_BIT,
+ EGL_NONE
+ };
+
+ EGLConfig ecfg;
+ EGLint num_config;
+ if (!eglChooseConfig(edisplay, attr, &ecfg, 1, &num_config)) {
+ fprintf(stderr, "Failed to choose config (eglError: %s)\n");
+ return EGL_NO_SURFACE;
+ }
+ EGLint pixel_format = EGL_PIXEL_FORMAT_ARGB_8888_BRCM;
+ EGLint rt;
+ eglGetConfigAttrib(edisplay, ecfg, EGL_RENDERABLE_TYPE, &rt);
+
+ if (rt & EGL_OPENGL_ES_BIT) {
+ pixel_format |= EGL_PIXEL_FORMAT_RENDER_GLES_BRCM;
+ pixel_format |= EGL_PIXEL_FORMAT_GLES_TEXTURE_BRCM;
+ }
+ if (rt & EGL_OPENGL_ES2_BIT) {
+ pixel_format |= EGL_PIXEL_FORMAT_RENDER_GLES2_BRCM;
+ pixel_format |= EGL_PIXEL_FORMAT_GLES2_TEXTURE_BRCM;
+ }
+ if (rt & EGL_OPENVG_BIT) {
+ pixel_format |= EGL_PIXEL_FORMAT_RENDER_VG_BRCM;
+ pixel_format |= EGL_PIXEL_FORMAT_VG_IMAGE_BRCM;
+ }
+ if (rt & EGL_OPENGL_BIT) {
+ pixel_format |= EGL_PIXEL_FORMAT_RENDER_GL_BRCM;
+ }
+ EGLint pixmap[5];
+ pixmap[0] = 0;
+ pixmap[1] = 0;
+ pixmap[2] = width;
+ pixmap[3] = height;
+ pixmap[4] = pixel_format;
+ eglCreateGlobalImageBRCM(width, height, pixmap[4], 0, width*4, pixmap);
+ egl_surface = eglCreatePixmapSurface(edisplay, ecfg, pixmap, 0);
+ puts("EGL Surface Created");
+ EGLint ctxattr[] = {
+ EGL_CONTEXT_CLIENT_VERSION, 2,
+ EGL_NONE
+ };
+ EGLContext context = eglCreateContext ( edisplay, ecfg, EGL_NO_CONTEXT, ctxattr );
+ eglMakeCurrent(edisplay, egl_surface, egl_surface, context);
+ return egl_surface;
+}
+EGLBoolean eglSwapBuffers(EGLDisplay edisplay, EGLSurface egsurface) {
+ if (x11_enabled == 0) {
+ return real_eglSwapBuffers(edisplay,egsurface);
+ }
+ unsigned int *buffer = (unsigned int *)malloc(height * width * 4);
+ glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+ static GC gc;
+ static int status =0;
+ static XImage *image =0;
+ static Pixmap pixmap;
+ static XGCValues gcvalues;
+ if (status == 0 ) {
+ gc = XCreateGC(display, window,0,&gcvalues);
+ image = XGetImage(display, window, 0, 0, width, height, AllPlanes, ZPixmap);
+ status = 1;
+ }
+ XImage *img = XCreateImage(display,CopyFromParent,depth,ZPixmap,0,buffer,width, height, 32, 0);
+ XPutImage(display, window, gc, img, 0, 0, 0, 0, width, height);
+ free(buffer);
+ return EGL_TRUE;
+}
+
--
2.12.2
From 226211f1536099e732d24751e6e20fd467e10123 Mon Sep 17 00:00:00 2001
From: sfan5 <sfan5@live.de>
Date: Sat, 8 Apr 2017 17:17:21 +0200
Subject: [PATCH] half-working(?) rpi support
IMPORTANT: this commit is based on 0.4.14
find required packages in deps.txt
the changes to tab_mainmenu.lua are purely cosmetic
files from <irrlicht dir>/media/Shaders/ should be placed in client/shaders/Irrlicht/
the CGUITTFont.cpp change avoid a SIGFPE that happens for some reason
---
builtin/mainmenu/tab_settings.lua | 8 ++++----
cmake/Modules/FindOpenGLES2.cmake | 21 ++++-----------------
deps.txt | 2 ++
src/CMakeLists.txt | 3 +++
src/cguittfont/CGUITTFont.cpp | 1 +
src/client/clientlauncher.cpp | 4 ++++
src/defaultsettings.cpp | 6 +++---
7 files changed, 21 insertions(+), 24 deletions(-)
create mode 100644 deps.txt
diff --git a/builtin/mainmenu/tab_settings.lua b/builtin/mainmenu/tab_settings.lua
index af8df0cc..be0d7121 100644
--- a/builtin/mainmenu/tab_settings.lua
+++ b/builtin/mainmenu/tab_settings.lua
@@ -198,10 +198,10 @@ local function formspec(tabview, name, tabdata)
.. getSettingIndex.Mipmap() .. "]" ..
"label[3.85,2.15;" .. fgettext("Antialiasing:") .. "]" ..
"dropdown[3.85,2.6;3.85;dd_antialiasing;" .. dd_options.antialiasing[1] .. ";"
- .. getSettingIndex.Antialiasing() .. "]" ..
+ .. getSettingIndex.Antialiasing() .. "]" --[[..
"box[7.75,0;4,4.4;#999999]" ..
"checkbox[8,0;cb_shaders;" .. fgettext("Shaders") .. ";"
- .. dump(core.setting_getbool("enable_shaders")) .. "]"
+ .. dump(core.setting_getbool("enable_shaders")) .. "]"]]
if PLATFORM == "Android" then
tab_string = tab_string ..
@@ -242,7 +242,7 @@ local function formspec(tabview, name, tabdata)
"checkbox[8,3.5;cb_waving_plants;" .. fgettext("Waving Plants") .. ";"
.. dump(core.setting_getbool("enable_waving_plants")) .. "]"
else
- tab_string = tab_string ..
+ --[[tab_string = tab_string ..
"tablecolumns[color;text]" ..
"tableoptions[background=#00000000;highlight=#00000000;border=false]" ..
"table[8.33,0.7;3.5,4;shaders;" ..
@@ -253,7 +253,7 @@ local function formspec(tabview, name, tabdata)
"#888888," .. fgettext("Waving Water") .. "," ..
"#888888," .. fgettext("Waving Leaves") .. "," ..
"#888888," .. fgettext("Waving Plants") .. "," ..
- ";1]"
+ ";1]"]]
end
return tab_string
diff --git a/cmake/Modules/FindOpenGLES2.cmake b/cmake/Modules/FindOpenGLES2.cmake
index a8622f3b..3178ebc9 100644
--- a/cmake/Modules/FindOpenGLES2.cmake
+++ b/cmake/Modules/FindOpenGLES2.cmake
@@ -37,35 +37,22 @@ elseif(APPLE)
set(OPENGLES2_LIBRARY "-framework OpenGLES")
else()
find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h
- PATHS /usr/openwin/share/include
- /opt/graphics/OpenGL/include
- /usr/X11R6/include
- /usr/include
+ PATHS /opt/vc/include
)
find_library(OPENGLES2_LIBRARY
NAMES GLESv2
- PATHS /opt/graphics/OpenGL/lib
- /usr/openwin/lib
- /usr/shlib /usr/X11R6/lib
- /usr/lib
+ PATHS /opt/vc/lib
)
if(NOT BUILD_ANDROID)
find_path(EGL_INCLUDE_DIR EGL/egl.h
- PATHS /usr/openwin/share/include
- /opt/graphics/OpenGL/include
- /usr/X11R6/include
- /usr/include
+ PATHS /opt/vc/include
)
find_library(EGL_LIBRARY
NAMES EGL
- PATHS /opt/graphics/OpenGL/lib
- /usr/openwin/lib
- /usr/shlib
- /usr/X11R6/lib
- /usr/lib
+ PATHS /opt/vc/lib
)
# On Unix OpenGL usually requires X11.
diff --git a/deps.txt b/deps.txt
new file mode 100644
index 00000000..f8c8e71a
--- /dev/null
+++ b/deps.txt
@@ -0,0 +1,2 @@
+sudo apt-get install -y \
+ g{it,cc,++} cmake lib{freetype6,openal,curl4-openssl,ogg,vorbis,sqlite3,luajit-5.1,x11,gmp3,jsoncpp}-dev
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index feca199c..829afe11 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -286,9 +286,11 @@ else()
if(BUILD_CLIENT)
find_package(X11 REQUIRED)
find_package(OpenGL REQUIRED)
+ if(NOT ENABLE_GLES)
find_package(JPEG REQUIRED)
find_package(BZip2 REQUIRED)
find_package(PNG REQUIRED)
+ endif()
if(APPLE)
find_library(CARBON_LIB Carbon)
find_library(COCOA_LIB Cocoa)
@@ -557,6 +559,7 @@ if(BUILD_CLIENT)
${GMP_LIBRARY}
${JSON_LIBRARY}
${OPENGLES2_LIBRARIES}
+ ${EGL_LIBRARIES}
${PLATFORM_LIBS}
${CLIENT_PLATFORM_LIBS}
)
diff --git a/src/cguittfont/CGUITTFont.cpp b/src/cguittfont/CGUITTFont.cpp
index 2342eb74..59c73bf0 100644
--- a/src/cguittfont/CGUITTFont.cpp
+++ b/src/cguittfont/CGUITTFont.cpp
@@ -187,6 +187,7 @@ void SGUITTGlyph::preload(u32 char_index, FT_Face face, video::IVideoDriver* dri
glyph_page = parent->getLastGlyphPageIndex();
u32 texture_side_length = page->texture->getOriginalSize().Width;
+ if(texture_side_length == 0) return;
core::vector2di page_position(
(page->used_slots % (texture_side_length / font_size)) * font_size,
(page->used_slots / (texture_side_length / font_size)) * font_size
diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp
index 404a1631..83ffbed7 100644
--- a/src/client/clientlauncher.cpp
+++ b/src/client/clientlauncher.cpp
@@ -553,6 +553,10 @@ bool ClientLauncher::create_engine_device()
params.PrivateData = porting::app_global;
params.OGLES2ShaderPath = std::string(porting::path_user + DIR_DELIM +
"media" + DIR_DELIM + "Shaders" + DIR_DELIM).c_str();
+#else
+ params.OGLES2ShaderPath = std::string(porting::path_share + DIR_DELIM +
+ "client" + DIR_DELIM + "shaders" + DIR_DELIM +
+ "Irrlicht" + DIR_DELIM).c_str();
#endif
device = createDeviceEx(params);
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index e8b652c1..66dfd0a4 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -112,7 +112,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("display_gamma", "1.8");
settings->setDefault("texture_path", "");
settings->setDefault("shader_path", "");
- settings->setDefault("video_driver", "opengl");
+ settings->setDefault("video_driver", "ogles2");
settings->setDefault("free_move", "false");
settings->setDefault("noclip", "false");
settings->setDefault("continuous_forward", "false");
@@ -127,7 +127,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("screenshot_quality", "0");
settings->setDefault("view_bobbing_amount", "1.0");
settings->setDefault("fall_bobbing_amount", "0.0");
- settings->setDefault("enable_3d_clouds", "true");
+ settings->setDefault("enable_3d_clouds", "false");
settings->setDefault("cloud_height", "120");
settings->setDefault("cloud_radius", "12");
settings->setDefault("menu_clouds", "true");
@@ -175,7 +175,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("enable_waving_leaves", "false");
settings->setDefault("enable_waving_plants", "false");
settings->setDefault("ambient_occlusion_gamma", "2.2");
- settings->setDefault("enable_shaders", "true");
+ settings->setDefault("enable_shaders", "false");
settings->setDefault("repeat_rightclick_time", "0.25");
settings->setDefault("enable_particles", "true");
settings->setDefault("enable_mesh_cache", "false");
--
2.12.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.