Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question]What about it means when the return value is 0 #13978

Open
ferrytt opened this issue Apr 23, 2021 · 3 comments
Open

[question]What about it means when the return value is 0 #13978

ferrytt opened this issue Apr 23, 2021 · 3 comments

Comments

@ferrytt
Copy link

ferrytt commented Apr 23, 2021

emscripten_webgl_create_context

The Returns is described as follows in the documentation:

On success, a strictly positive value that represents a handle to the created context. On failure, a negative number that can be cast to an EMSCRIPTEN_RESULT field to get the reason why the context creation failed.
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE

Is it SUCCESS or FAILURE when the return value is 0?

@ferrytt ferrytt changed the title [question]What about it means when return 0 [question]What about it means when the return value is 0 Apr 23, 2021
@stale
Copy link

stale bot commented Apr 27, 2022

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.

@stale stale bot added the wontfix label Apr 27, 2022
@sbc100
Copy link
Collaborator

sbc100 commented Apr 29, 2022

Have you seen it return zero. It sounds from the description that the function should not never return zero.

@stale stale bot removed the wontfix label Apr 29, 2022
@abram
Copy link

abram commented Nov 7, 2022

I experienced this issue today - emscripten_webgl_create_context returned zero. It was (accidentally) running in a pthread and EmscriptenWebGLContextAttributes.proxyContextToMainThread was set to EMSCRIPTEN_WEBGL_CONTEXT_PROXY_DISALLOW, so I would guess the 0 return value meant that there was a configuration problem. It would be nice to either return a negative value describing the problem (as per the current documentation), or update the docs to document the meaning of a zero return value. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants