None of glReadBuffer/glDrawBuffer/glDrawBuffers exist in GLES2 or WebGL - they are not needed in these APIs to create a depth buffer-only FBO. If your FBO is incomplete even when you did add a dummy color buffer, then the bug must be somewhere else.
2014-01-25 Bram Stolk <[email protected]> > 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 > > > > On Sat, Jan 25, 2014 at 9:35 AM, Alon Zakai <[email protected]> wrote: > >> You should use enough TOTAL_MEMORY for the app, if that value is >> sufficient for it to run then no more is needed. >> >> I see unminified function names in the generated code, so I think this is >> an -O1 or -O0 build, and not -O2? >> >> I get a webgl error, >> >> Error: WebGL: Retrieving a WebGL context from a canvas via a request id >> ('webgl') different from the id used to create the context >> ('experimental-webgl') is not allowed. tlctc.js:6097 >> Error: WebGL: getExtension('MOZ_WEBGL_depth_texture'): MOZ_ prefixed >> WebGL extension strings are deprecated. Support for them will be removed in >> the future. Use unprefixed extension strings. To get draft extensions, set >> the webgl.enable-draft-extensions preference. tlctc.js:6100 >> null tlctc.js:6101 >> [object WebGLExtensionDepthTexture] tlctc.js:6102 >> Error: WebGL: clear: incomplete framebuffer tlctc.js:6606 >> uncaught exception: Assertion failed: err == GL_NO_ERROR, at: >> ../Android/Game/ctrl.cpp,550,ctrl_drawShadow at stackTrace@ >> http://stolk.org/tlctc/js-uncompressed/tlctc.js:1264 >> ___assert_fail@http://stolk.org/tlctc/js-uncompressed/tlctc.js:6558 >> Runtime.dynCall@http://stolk.org/tlctc/js-uncompressed/tlctc.js:693 >> Browser_mainLoop_runner@ >> http://stolk.org/tlctc/js-uncompressed/tlctc.js:6133 >> >> - Alon >> >> >> >> On Sat, Jan 25, 2014 at 9:31 AM, Bram Stolk <[email protected]> wrote: >> >>> OK, >>> >>> Uncompressed version, with browser fix that avoids depth-only textures, >>> at: >>> >>> http://stolk.org/tlctc/js-uncompressed/ >>> >>> It runs on my HD3000 MacBook Air now :-) >>> Albeit slowly due to the crappy GPU in that machine. >>> >>> It's really big though: 16mb js, 24 mb data, so be patient. >>> >>> Should I have used a larger value than -s TOTAL_MEMORY=67108864 ? >>> >>> Bram >>> >>> >>> >>> On Sat, Jan 25, 2014 at 9:18 AM, Alon Zakai <[email protected]> wrote: >>> >>>> I get an out of memory error or my machine when trying to run it. >>>> >>>> Is it fully optimized (-O2)? >>>> >>>> Perhaps related to compression, any chance you can put up a version >>>> without the lzma compression? >>>> >>>> - Alon >>>> >>>> >>>> >>>> On Sat, Jan 25, 2014 at 1:16 AM, Bram Stolk <[email protected]> wrote: >>>> >>>>> Sure, >>>>> >>>>> I will keep a permanent copy at http://stolk.org/tlctc/bugrep/ >>>>> >>>>> Does the browser completely crash? >>>>> >>>>> On OSX, the javascript bails on an assert because the framebuffer is >>>>> incomplete. >>>>> I use a depth-only texture, which Version 32.0.1700.77 chrome does >>>>> not like. >>>>> >>>>> I tried adding glDrawbuffer( GL_NONE ) but this symbol is undefined >>>>> during linking? >>>>> Does emscripten link against GL or GLES2 when I build sdl sources? >>>>> >>>>> Bram >>>>> >>>>> >>>>> >>>>> On Sat, Jan 25, 2014 at 1:04 AM, Jukka Jylänki <[email protected]>wrote: >>>>> >>>>>> Hey, I manage to consistently crash Firefox Nightly on this - could >>>>>> you freeze this exact version of the page to some location that stays >>>>>> alive? I'm going to submit a crash report about this. >>>>>> >>>>>> Jukka >>>>>> >>>>>> >>>>>> 2014/1/25 Bram Stolk <[email protected]> >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> >>>>>>> Here's the first version of the emscripted port of my Crane >>>>>>> Simulator: >>>>>>> "The Little Crane That Could." >>>>>>> >>>>>>> http://stolk.org/tlctc/js/ >>>>>>> >>>>>>> Use arrow keys to drive truck, and on screen levers to control the >>>>>>> crane. >>>>>>> Drag mouse for camera control, +/- to zoom. >>>>>>> >>>>>>> If you try it out, please let me know your findings. >>>>>>> The decompression is rather slow (slower than the download) but the >>>>>>> files are nicely compacted. >>>>>>> >>>>>>> I'm amazed by what emscripten is able to do for me. (Pretty much >>>>>>> everything I do in C, except the UDP sockets.) >>>>>>> >>>>>>> Keep up the good work! >>>>>>> >>>>>>> Bram >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "emscripten-discuss" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to [email protected]. >>>>>>> >>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>> >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to a topic in >>>>>> the Google Groups "emscripten-discuss" group. >>>>>> To unsubscribe from this topic, visit >>>>>> https://groups.google.com/d/topic/emscripten-discuss/tzZxpzjWFEs/unsubscribe >>>>>> . >>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>> [email protected]. >>>>>> >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> “Programming today is a race between software engineers striving to >>>>> build bigger and better idiot- proof programs, and the Universe trying to >>>>> produce bigger and better idiots. So far, the Universe is winning.” (R >>>>> Cook). >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "emscripten-discuss" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "emscripten-discuss" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/emscripten-discuss/tzZxpzjWFEs/unsubscribe >>>> . >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> >>> >>> -- >>> >>> “Programming today is a race between software engineers striving to >>> build bigger and better idiot- proof programs, and the Universe trying to >>> produce bigger and better idiots. So far, the Universe is winning.” (R >>> Cook). >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "emscripten-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "emscripten-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/emscripten-discuss/tzZxpzjWFEs/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > > “Programming today is a race between software engineers striving to build > bigger and better idiot- proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning.” (R Cook). > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
