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

Add all common parameters to context definition and make gl.getParameter support. #66

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Molay
Copy link

@Molay Molay commented Mar 3, 2020

feat(webgl_rendering_context): Add all common parameters to context definition, make method gl.getParameter support int32array and float32array return value.
fix(webgl_rendering_context): Fix the return value of method gl.getContextAttributes.
feat(webgl_extensions): Add WEBGL_draw_buffers extension.
feat(egl_context_wrapper): Add method glGetFloatv to get float parameter value(s).


This change is Reviewable

…efinition, make method gl.getParameter support int32array and float32array return value.

fix(webgl_rendering_context): Fix the return value of method gl.getContextAttributes.
feat(webgl_extensions): Add WEBGL_draw_buffers extension.
feat(egl_context_wrapper): Add method glGetFloatv to get float parameter value(s).
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@Molay
Copy link
Author

Molay commented Mar 3, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

…port GLboolean, GLboolean[], BINDING(or null), and etc.

feat(test): Add src/tests/get_parameter_test.ts script.
feat(egl_context_wrapper): Add method glGetBooleanv to get boolean parameter value(s).
Copy link
Contributor

@nkreeger nkreeger left a comment

Choose a reason for hiding this comment

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

Sorry I was out on leave and missed this!

Just a few comments, thank you for this detailed PR!

const { name, type, subType, length, /*nullable,*/ extension } = parameterDefinition;
let ptarget: any = gl, pname: GLenum;
const result = new VerifyResult();
// if (name === 'DRAW_BUFFER?_WEBGL') return verifyDrawBuffersWebgl(gl, parameterDefinition);
Copy link
Contributor

Choose a reason for hiding this comment

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

Cleanup here?

value = gl.getParameter(pname);
}
catch (error) {
// return result.setObject(error);
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto here.

let numPassed = 0;
parameterDefinitions.forEach((parameterDefinition, index) => {
const result = verifyParameterDefinition(gl, parameterDefinition);
result.passed ? process.stdout.write(`\u001b[92m`) : process.stdout.write(`\u001b[91m`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like some formatting problems here.

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