From 382a64fddbc4f88cc9a4f5dab6790126cebd7e25 Mon Sep 17 00:00:00 2001 From: cutealien Date: Tue, 11 Apr 2017 12:00:30 +0000 Subject: [PATCH] Fix some bugs introduced by me while applying emscripten patch. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5407 dfc29bdd-3216-0410-991c-e03cc46cb475 --- examples/01.HelloWorld_emscripten/Makefile | 2 +- examples/01.HelloWorld_emscripten/main.cpp | 4 ++-- examples/01.HelloWorld_emscripten/readme.txt | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/examples/01.HelloWorld_emscripten/Makefile b/examples/01.HelloWorld_emscripten/Makefile index 45f74a3b..e9bd5120 100644 --- a/examples/01.HelloWorld_emscripten/Makefile +++ b/examples/01.HelloWorld_emscripten/Makefile @@ -31,7 +31,7 @@ endif all: all_linux # target specific settings - ll_linux all_emscripten all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht +all_linux all_emscripten all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht all_linux: LDFLAGS += -L/usr/X11R6/lib$(LIBSELECT) -lGL -lEGL -lGLESv1_CM -lGLESv2 -lXxf86vm -lXext -lX11 -lXcursor all_linux clean_linux: SYSTEM=Linux all_emscripten clean_emscripten: SYSTEM=emscripten diff --git a/examples/01.HelloWorld_emscripten/main.cpp b/examples/01.HelloWorld_emscripten/main.cpp index f11f47ca..5f6bba28 100644 --- a/examples/01.HelloWorld_emscripten/main.cpp +++ b/examples/01.HelloWorld_emscripten/main.cpp @@ -157,7 +157,7 @@ int main() device = createDevice(video::EDT_OGLES2, dimension2d(640, 480), 16, false, false, false, 0); -+#endif //__EMSCRIPTEN__ +#endif //__EMSCRIPTEN__ if (!device) return 1; @@ -257,7 +257,7 @@ int main() driver->endScene(); } -+#ifndef __EMSCRIPTEN__ +#ifndef __EMSCRIPTEN__ /* After we are done with the render loop, we have to delete the Irrlicht Device created before with createDevice(). In the Irrlicht Engine, you diff --git a/examples/01.HelloWorld_emscripten/readme.txt b/examples/01.HelloWorld_emscripten/readme.txt index aa608bab..40e1036f 100644 --- a/examples/01.HelloWorld_emscripten/readme.txt +++ b/examples/01.HelloWorld_emscripten/readme.txt @@ -3,3 +3,23 @@ See http://kripken.github.io/emscripten-site for more information. emscripten support for Irrlicht is a work in process. Use at your own risk. Might take work and knowledge to get it running. + +------------ +REQUIREMENTS +------------ +You have to install the emscripten environment. + +---------------------------- +BUILDING Irrlicht & your App +---------------------------- + +Linux: +Modify IrrCompileConfig.h and in the __EMSCRIPTEN__ section enable the line with _IRR_LINUX_PLATFORM_ marked as 'hack' +(we'll improve that in future). + +Go into source/Irrlicht folder and call: +emmake make emscripten + + +Go into examples/01.HelloWord_emscripten folder and call: +emmake make all_emscripten