Well I think I found my problem. It appears that WebGL isn't supported in
a worker.
The code from the library and shims for web workers//canvas make this
pretty apparent:
canvas.getContext = function canvas_getContext(type) {
assert(type == '2d');
Everything works fine if I remove --proxy-to-worker off of the linking to
JS step.. Is there a known work around or something I missed to get WebGL
working in a worker?
On Thursday, May 1, 2014 12:44:22 AM UTC-6, Trevor Linton wrote:
>
> Thanks,
>
> I poked through the GLESV2/SDL unit tests and altered the code to use
> it... However, i'm now no longer getting GLctx.getParameter is undefined
> but my console window is saying GLctx is undefined...
>
> I also get this in the "output" (black window on the default emscripten
> html file):
>
> Assertion failed: undefined
> Could not create canvas: ?,TypeError: canvas.removeEventListener is not a
> function
>
> Could this be due to using a webworker proxy? Or is this another side
> effect of not properly having a GL context established?
>
> - Trevor
>
> On Wednesday, April 30, 2014 2:27:05 AM UTC-6, jj wrote:
>>
>> Perhaps your code is calling glGetString() before having initialized a GL
>> context? Try adding debug code before file:///
>> Tint/webkit.js/Debug/webkit.js:10729 to check that the GLctx object is
>> valid, which it should be iff a proper GL context has been initialized.
>>
>>
>> 2014-04-30 7:53 GMT+03:00 Trevor Linton <[email protected]>:
>>
>>> I'm having an odd problem of trying to use OpenGLES and EGL developing
>>> webkit. With emscripten 1.16 i've found an odd new problem, i'm getting an
>>> undefined function GLctx.getParameter when the program tries to call
>>> glGetString(GL_VERSION). I'm compiling with -s FULL_ES2=1 when doing the
>>> final link. Here's the runtime out:
>>>
>>> "WebKit Trace:
>>> ../deps/WebKit/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp[71]
>>>
>>> WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon(WebCore::GraphicsContext3D
>>>
>>> *)" webkit.html:1245
>>> "exception thrown: TypeError: GLctx.getParameter is not a
>>> function,_glGetString@file:///Tint/webkit.js/Debug/webkit.js:10729
>>> callMain@file:///Tint/webkit.js/Debug/webkit.js:3265810
>>> doRun@file:///Tint/webkit.js/Debug/webkit.js:3265867
>>> run/<@file:///Tint/webkit.js/Debug/webkit.js:3265879
>>> "
>>>
>>> Suggestions?
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>>
--
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/d/optout.