This looks like at least 2 problems:

- It looks like it tries to run WebGL2 code on a WebGL1 context. Even when 
linking with USE_WEBGL2=1 you still need to explicitly create a WebGL2 
context. I don't know how that works with the SDL wrapper, but I guess it's 
the same as creating a GLES3 context on native platforms.

- The shaders can't be compiled, most likely because these are written in 
desktop OpenGL3 syntax, yes WebGL2 only accepts GLES2 / GLES3 shader syntax 
(each GL version has basically its own shading language, most of them 
incompatible to each other).

Cheers!

On Tuesday, 22 January 2019 18:34:31 UTC+1, Paulo Coutinho wrote:
>
> Im using opengl3 because opengl2 i get compilation error too:
>
> OpenGL2 compilation errors:
>
> error: undefined symbol: glColorPointer
>
> warning: To disable errors for undefined symbols use `-s 
> ERROR_ON_UNDEFINED_SYMBOLS=0`
>
> error: undefined symbol: glDisableClientState
>
> error: undefined symbol: glEnableClientState
>
> error: undefined symbol: glOrtho
>
> error: undefined symbol: glPolygonMode
>
> error: undefined symbol: glPopAttrib
>
> error: undefined symbol: glPopMatrix
>
> error: undefined symbol: glPushAttrib
>
> error: undefined symbol: glPushMatrix
>
> error: undefined symbol: glTexCoordPointer
>
> Error: Aborting compilation due to previous errors
>
> shared:ERROR: '/Users/paulo/Developer/emsdk/node/8.9.1_64bit/bin/node 
> /Users/paulo/Developer/emsdk/emscripten/1.38.24/src/compiler.js 
> /tmp/tmphhMOiL.txt 
> /Users/paulo/Developer/emsdk/emscripten/1.38.24/src/library_pthread_stub.js' 
> failed (1)
>
> And with OpenGL3 i get this errors on browser:
>
> [image: Screenshot 2019-01-22 15.27.55.png]
>
>
>
> Thanks for any help.
>
> On Thursday, January 17, 2019 at 3:41:00 PM UTC-2, Paulo Coutinho wrote:
>>
>> Hi,
>>
>> Im trying make an example of using imgui inside a sample of my tool 
>> ezored (http://www.ezored.com) with emscripten.
>>
>> Im using emscripten 1.38.22, sdl2, opengl2 and this imgui example as 
>> reference:
>>
>> https://github.com/ocornut/imgui/blob/master/examples/example_sdl_opengl2/main.cpp
>>
>> But i have some problems. 
>>
>>
>>    1. What i really need for imgui and sdl2 and wasm? I put some TODOs 
>>    because my project is working with that TODO lines, 
>> "SDL_GL_SetAttribute", 
>>    "SDL_GL_SwapWindow", and other marked with TODO. If anyone can help me 
>> the 
>>    main.cpp file is here:
>>    
>>    
>> https://github.com/ezored/sample-wasm/blob/imgui/source/local/dependency-app/build/source/cpp/canvas/main.cpp
>>    
>>    Only need search for "TODO: WE NEED IT FOR WASM?".
>>    
>>    My working example without these specific opengl functions is here:
>>    http://public.ezored.com/sample-wasm/    (CANVAS EXAMPLE)
>>    
>>    2. Based on my main.cpp file im getting compilation error:
>>    
>>    error: undefined symbol: glColorPointer
>>    
>>    warning: To disable errors for undefined symbols use `-s 
>>    ERROR_ON_UNDEFINED_SYMBOLS=0`
>>    
>>    error: undefined symbol: glDisableClientState
>>    
>>    error: undefined symbol: glEnableClientState
>>    
>>    error: undefined symbol: glOrtho
>>    
>>    error: undefined symbol: glPolygonMode
>>    
>>    error: undefined symbol: glPopAttrib
>>    
>>    error: undefined symbol: glPopMatrix
>>    
>>    error: undefined symbol: glPushAttrib
>>    
>>    error: undefined symbol: glPushMatrix
>>    
>>    error: undefined symbol: glTexCoordPointer
>>    
>>    Error: Aborting compilation due to previous errors
>>    
>>    shared:ERROR: '/Users/paulo/Developer/emsdk/node/8.9.1_64bit/bin/node 
>>    /Users/paulo/Developer/emsdk/emscripten/1.38.22/src/compiler.js 
>>    /tmp/tmpBF_WjX.txt 
>>    
>> /Users/paulo/Developer/emsdk/emscripten/1.38.22/src/library_pthread_stub.js' 
>>    failed (1)
>>    
>>
>> Can anyone help me finish this example?
>>
>> Thanks.
>>
>

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

Reply via email to