Skip to content

Commit 129a90a

Browse files
committed
Clarify what target=0 means for emscripten_webgl_create_context().
1 parent 3f74d2a commit 129a90a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

system/include/emscripten/html5.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,8 @@ typedef struct EmscriptenWebGLContextAttributes {
692692

693693
/*
694694
* Creates a new WebGL context. See http://www.khronos.org/registry/webgl/specs/latest/1.0/#2.1
695-
* The parameter 'target' specifies the DOM canvas element in which to initialize the WebGL context.
695+
* The parameter 'target' specifies the DOM canvas element in which to initialize the WebGL context. If 0 is passed for the target,
696+
* the element specified by Module.canvas will be used.
696697
* On success, this function returns a strictly positive value that represents a handle to the created context.
697698
* On failure, this function returns a negative number that can be casted to a EMSCRIPTEN_RESULT field to get an error reason
698699
* why the context creation failed.

0 commit comments

Comments
 (0)