undefined gl function (glBindFramebuffer)

10 views
Skip to first unread message

Ken Martin

unread,
Apr 21, 2020, 3:59:42 PM4/21/20
to emscripten-discuss
I compiled an opengl app (SDL2 based) and in testing I'm getting a black window and some trace output such as the following (this is on emscripten 1.38.48)  specifically for bindFramebuffer and blitFramebuffer. Other calls seem OK. Does this ring a bell with anyone? Does undefined mean the function doesn;t exist somehow?  Any help/pointers appreciated

Thanks!

[Thread 1, GL ctx: 5659568]: bindFramebuffer(36009, [object WebGLFramebuffer]) -> undefined webtest.js:6833:97
   webgl_2 http://localhost:8000/webtest.js:6833
    _glBindFramebuffer http://localhost:8000/webtest.js:11083
    __ZN14vtkOpenGLState18vtkBindFramebufferEjP26vtkOpenGLFramebufferObject http://localhost:8000/webtest.js line 1606 > WebAssembly.instantiate:145555
    __ZN26vtkOpenGLFramebufferObject4BindEj http://localhost:8000/webtest.js line 1606 > WebAssembly.instantiate:186592
    __ZN21vtkOpenGLRenderWindow5StartEv http://localhost:8000/webtest.js line 1606 > WebAssembly.instantiate:120060
    __ZN15vtkRenderWindow6RenderEv http://localhost:8000/webtest.js line 1606 > WebAssembly.instantiate:278588
    __ZN21vtkOpenGLRenderWindow6RenderEv http://localhost:8000/webtest.js line 1606 > WebAssembly.instantiate:118526
    _main http://localhost:8000/webtest.js line 1606 > WebAssembly.instantiate:60826
    _main http://localhost:8000/webtest.js:12231
    callMain http://localhost:8000/webtest.js:12818
    doRun http://localhost:8000/webtest.js:12877
    run http://localhost:8000/webtest.js:12892
    runCaller http://localhost:8000/webtest.js:12797
    removeRunDependency http://localhost:8000/webtest.js:1474
    receiveInstance http://localhost:8000/webtest.js:1589
    receiveInstantiatedSource http://localhost:8000/webtest.js:1600

with main compiled as

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s USE_SDL=2 \
   -s TRACE_WEBGL_CALLS=1 \
   -s GL_DEBUG=1 \
   -s USE_WEBGL2=1 -s FULL_ES3=1 -std=c++11 --bind \
   -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s ALLOW_MEMORY_GROWTH=1 -g3 \
   -s DEMANGLE_SUPPORT=1 -s WASM=1 -s EMULATE_FUNCTION_POINTER_CASTS=0 \
   -s MODULARIZE=1 -s EXPORT_NAME=webtest -s USE_FREETYPE=1 -O2 -s FORCE_FILESYSTEM=1 \
   -s EXTRA_EXPORTED_RUNTIME_METHODS=[\"FS\"]")



but links against libs that maybe compiled without all the same options (but with SDL2/Webgl2/FULL_ES3)

Ken Martin

unread,
Apr 22, 2020, 10:42:26 AM4/22/20
to emscripten-discuss
Ahh I think I get it, "undefined" just means the return value is undefined.
Reply all
Reply to author
Forward
0 new messages