Whoa! Still incomplete frame buffer?
It seems the work around I put in does not always work.
Anyways... I thought a little more on this depth buffer issue.
I think it may actually be an emscripten bug, not a browser bug.
The problem is that some platforms (like windows) need:
glDrawBuffer( GL_NONE );
glReadBuffer( GL_NONE );
When using a depth only texture.
When using emscripten, this compiles, but will not link due to missing symbols.
BTW: glDrawBuffer and glReadBuffer are part of OpenGL, but missing in ES2.
I don't know which one is used with SDL, but if emscripten can use these calls, I think the issue will be solved.
/home/bram/src/emscripten/em++ -DJS -DLANDSCAPE -s ASM_JS=1 -Wno-warn-absolute-paths -I../Models.game/geom -I../Models.editor/geom -I../../Base/C -I../Editor/C -I../PI -I../PI/WorldObjects -I../PI/VehicleObjects -I../Android/Game -I/home/bram/src/opende/include -I/home/bram/include -g -Wall -Wno-missing-braces -MMD -MP -DDEBUG -DdDEBUG -O1 -o bin/tlctc.html src/main.cpp \
-lgame -lpi -led -lvehicleobjects -lworldobjects -lbase -lode -L. -L/home/bram/src/opende.js/ \
-s TOTAL_MEMORY=67108864 \
--preload-file Sounds@ \
--preload-file Textures@ \
warning: unresolved symbol: glReadBuffer
warning: unresolved symbol: glDrawBuffer
warning: unresolved symbol: nextafterf
bram@Ubuntu64:~/apps/LittleCrane/JS$
Lastly: yes, -O1 is used.
For my future builds, I will switch to -O2.
Thx,
Bram