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

WebGLCubeRenderTarget: simplify constructor signature #18300

Merged
merged 3 commits into from
Jan 14, 2020

Conversation

WestLangley
Copy link
Collaborator

Since width and height must be the same, this PR simplifies the constructor signature:

WebGLCubeRenderTarget( width, height, options )

is now

WebGLCubeRenderTarget( resolution, options ).

@WestLangley WestLangley added this to the r113 milestone Jan 3, 2020
@mrdoob
Copy link
Owner

mrdoob commented Jan 5, 2020

I'm unsure about resolution... Maybe size?
Is this a limitation of WebGL 2.0 too?

@WestLangley
Copy link
Collaborator Author

I'm unsure about resolution... Maybe size?

Done!

Is this a limitation of WebGL 2.0 too?

A cube has 6 identically-sized 2D faces. I am not aware of a WebGL 2.0 use case that is different.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 6, 2020

I am not aware of a WebGL 2.0 use case that is different.

Maybe it's more safe to keep the signature as it is since it's more flexibel. How knows which use cases come up in the future....

@WestLangley
Copy link
Collaborator Author

Who knows which use cases come up in the future....

This is not about use cases. There are no other use cases allowed. If you pass in a height that is not equal to width, you get a gl error.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 6, 2020

If you pass in a height that is not equal to width, you get a gl error.

Um, is this also true for WebGPU?

@WestLangley
Copy link
Collaborator Author

It is true everywhere: A cube has 6 square sides.

We should not have had both width and height parameters in the first place.

@WestLangley
Copy link
Collaborator Author

@mrdoob I honored your requested change.

@mrdoob mrdoob merged commit c0704df into mrdoob:dev Jan 14, 2020
@mrdoob
Copy link
Owner

mrdoob commented Jan 14, 2020

Thanks!

@WestLangley WestLangley deleted the dev_cube_rt_signature branch January 14, 2020 21:03
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.

3 participants