emscripten-core / emscripten-core/emscripten

TypeError: GLctx.createProgram is not a function while using -s PROXY_TO_PTHREAD

Open
#16,381 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

the gl function ```glcreateprogram()``` doesn't work when using the following link flags :

```
"-g","-s PROXY_TO_PTHREAD", "-fPIC","-s NO_DISABLE_EXCEPTION_CATCHING", "-s ALLOW_MEMORY_GROWTH=1", "-pthread", "-s PTHREAD_POOL_SIZE=3", "-s USE_PTHREADS=1", "-s ALLOW_TABLE_GROWTH", "-s ASSERTIONS=1", "-s EXPORTED_RUNTIME_METHODS=['FS']", "-s DYNCALLS=1","-s MAIN_MODULE=2", "-s USE_WEBGL2=1", "-s FULL_ES3=1", "-s OFFSCREEN_FRAMEBUFFER=1","-s FORCE_FILESYSTEM=1", "--profiling",
```

and produces the error below :
```
Runtime.worker.js:191 TypeError: GLctx.createProgram is not a function
at _emscripten_glCreateProgram (Runtime.js:7657:22)
at glCreateProgram (webgl1.c:175)
at Akkad::Graphics::GLESShader::GLESShader(char Akkad::Graphics::GLESShader::GLESShader(char const*) (GLESShader.cpp:15)
at std::__2::__shared_ptr_emplace >::__shared_ptr_emplace(std::__2::allocator, char std::__2::__shared_ptr_emplace >::__shared_ptr_emplace(std::__2::allocator, char const*&) (shared_ptr.h:298)
at std::__2::shared_ptr std::__2::allocate_shared, char const*&, void>(std::__2::allocator const&, char std::__2::shared_ptr std::__2::allocate_shared, char const*&, void>(std::__2::allocator const&, char const*&) (shared_ptr.h:1106)
at std::__2::shared_ptr std::__2::make_shared(char std::__2::shared_ptr std::__2::make_shared(char const*&) (shared_ptr.h:1115)
at std::__2::shared_ptr CreateSharedPtr(char std::__2::shared_ptr CreateSharedPtr(char const*&) (core.h:13)
at Akkad::Graphics::GLESPlatform::CreateShader(char Akkad::Graphics::GLESPlatform::CreateShader(char const*) (GLESPlatform.cpp:42)
at Akkad::Graphics::Renderer2D::InitShadersImpl() (Renderer2D.cpp:540)
at Akkad::Graphics::Renderer2D::InitShaders() (Renderer2D.h:52)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.