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

Fixes some WebGL types #4197

Merged
merged 4 commits into from
Jun 21, 2022
Merged

Fixes some WebGL types #4197

merged 4 commits into from
Jun 21, 2022

Conversation

kungfooman
Copy link
Collaborator

First I just wanted to fix this line:

            location = gl.getUniformLocation(glProgram, info.name);

            shaderInput = new ShaderInput(device, info.name, device.pcUniformType[info.type], location);

location is a WebGLUniformLocation, while ShaderInput just treats it as a number. So maybe ShaderInput should at some point also have its own Webgl wrapper? And then it escalated to get the other types right.

API: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getUniformLocation

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

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

looks good to me

@mvaligursky mvaligursky merged commit e0d6dc4 into playcanvas:main Jun 21, 2022
@willeastcott
Copy link
Contributor

After merging this, the docs build process has errors:

image

@kungfooman
Copy link
Collaborator Author

Thank you for pointing that out @willeastcott

I traced it a bit and it comes from https://www.npmjs.com/package/catharsis

Testing expression in node:

> catharsis = require("catharsis");
> catharsis.parse("number", {jsdoc: true}); // working example
> catharsis.parse("[number, number]", {jsdoc: true}); // throws this error

Luckily the other pages generate without a problem so far.

I tried this kind of declaring a tuple too: https://stackoverflow.com/questions/64739315/how-to-document-tuple-using-jsdoc

But for some reason that throws the same error (npm run docs)

So I have to see how to make catharsis accept a tuple or just reverting that tuple.

@kungfooman kungfooman deleted the fixSomeTypes branch May 13, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants