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
master
cutealien 2017-04-11 12:00:30 +00:00
parent 55040b8c57
commit 382a64fddb
3 changed files with 23 additions and 3 deletions

View File

@ -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

View File

@ -157,7 +157,7 @@ int main()
device =
createDevice(video::EDT_OGLES2, dimension2d<u32>(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

View File

@ -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