-
Notifications
You must be signed in to change notification settings - Fork 439
Added interfaces of WebGL extensions in recommended specification status #301
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
Added interfaces of WebGL extensions in recommended specification status #301
Conversation
inputfiles/addedTypes.json
Outdated
"kind": "interface", | ||
"name": "WEBGL_lose_context", | ||
"flavor": "DOM", | ||
"constructorSignatures": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i do not think you need these. these are types only and do not exisit at runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry not to understand. But, what are you mean these
in this context?
I should delete constructorSignatures? or I should remove WEBGL_lose_context?
Do you mean there is no such type under window like window.WEBGL_lose_context
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only constructorSignatures
should be removed.
baselines/dom.generated.d.ts
Outdated
readonly MAX_EXT: number; | ||
} | ||
|
||
declare var EXT_blend_minmax: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean EXY_blend_minmax
is not needed?
Why? I think that is recommended status on Khronos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXT_blend_minmax
is defined with [NoInterfaceObject]
, so the interface declaration itself is needed but declare var
part is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any reasons that I should remove several interfaces.
I thought what I should consider is only the status is recommended or not.
Or is these types are wrong?
baselines/dom.generated.d.ts
Outdated
readonly MAX_EXT: number; | ||
} | ||
|
||
declare var EXT_blend_minmax: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean EXY_blend_minmax
is not needed?
Why? I think that is recommended status on Khronos.
inputfiles/addedTypes.json
Outdated
"kind": "interface", | ||
"name": "WEBGL_lose_context", | ||
"flavor": "DOM", | ||
"constructorSignatures": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry not to understand. But, what are you mean these
in this context?
I should delete constructorSignatures? or I should remove WEBGL_lose_context?
Do you mean there is no such type under window like window.WEBGL_lose_context
?
Sorry for late to fix this PR. I have fixed 2 reviewed points. |
baselines/dom.generated.d.ts
Outdated
getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null; | ||
getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture|null; | ||
getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info|null; | ||
getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc|null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. can you make sure there is a space before and after |
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed this with last commit.
@@ -12479,7 +12479,29 @@ interface WebGLRenderingContext { | |||
getBufferParameter(target: number, pname: number): any; | |||
getContextAttributes(): WebGLContextAttributes; | |||
getError(): number; | |||
getExtension(name: string): any; | |||
getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need | null
? should not all these extensions be supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getExtension
can return null if the extension is not supported on the environment.
This is not only depends on which browser the user using, but also depends on GPU chips, display drivers or browser extension flags.
Therefore, developer should consider the situation the returned value is null.
baselines/dom.generated.d.ts
Outdated
interface EXT_frag_depth { | ||
} | ||
|
||
declare var EXT_frag_depth: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you do not need all the declare var
s. please remove them all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed also.
This issue is related to microsoft/TypeScript#18633 .
Several extensions in draft status are ignored. I just added several interfaces of specification which has recommended status on specification published by Khronos.
See these specifications for more details.