Skip to content

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

Merged
merged 4 commits into from
Nov 14, 2017

Conversation

@msftclas
Copy link

msftclas commented Sep 27, 2017

CLA assistant check
All CLA requirements met.

@kyasbal kyasbal changed the title Added several interfaces of WebGL extensions Added interfaces of WebGL extensions in recommended specification status Sep 27, 2017
"kind": "interface",
"name": "WEBGL_lose_context",
"flavor": "DOM",
"constructorSignatures": [
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

readonly MAX_EXT: number;
}

declare var EXT_blend_minmax: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

Copy link
Contributor Author

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.

Copy link
Contributor

@saschanaz saschanaz Oct 22, 2017

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.

Copy link
Contributor Author

@kyasbal kyasbal left a 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?

readonly MAX_EXT: number;
}

declare var EXT_blend_minmax: {
Copy link
Contributor Author

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.

"kind": "interface",
"name": "WEBGL_lose_context",
"flavor": "DOM",
"constructorSignatures": [
Copy link
Contributor Author

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?

@kyasbal
Copy link
Contributor Author

kyasbal commented Nov 12, 2017

Sorry for late to fix this PR. I have fixed 2 reviewed points.
Could you review again?

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;
Copy link
Contributor

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

Copy link
Contributor Author

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;
Copy link
Contributor

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?

Copy link
Contributor Author

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.

interface EXT_frag_depth {
}

declare var EXT_frag_depth: {
Copy link
Contributor

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 vars. please remove them all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed also.

@mhegazy mhegazy merged commit 718e339 into microsoft:master Nov 14, 2017
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

Successfully merging this pull request may close these issues.

4 participants